-
Notifications
You must be signed in to change notification settings - Fork 142
Add agent skills for AI coding #2804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
yihao03
wants to merge
14
commits into
MarkBind:master
Choose a base branch
from
yihao03:feat/experiment-with-skills
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,490
−460
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9c52707
Add skills
yihao03 c0d5893
Remove unhelpful skills
yihao03 ee9c7e7
Remove unnecessary readme
yihao03 0af8597
Update ts migration skill
yihao03 ff6f678
Merge branch 'master' into feat/experiment-with-skills
yihao03 92b9571
Move skills to .github directory
yihao03 efad03f
Merge branch 'master' into feat/experiment-with-skills
yihao03 32a39da
Merge branch 'feat/experiment-with-skills' of github.com:yihao03/mark…
yihao03 06a0379
Merge branch 'master' into feat/experiment-with-skills
yihao03 8e1a507
Add agents
yihao03 c8a5a50
Removed hard to maintain skills
yihao03 b42058d
Update docs
yihao03 5f590fd
Add AI tools directories to gitignore
yihao03 6a24065
Merge branch 'master' into feat/experiment-with-skills
yihao03 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| --- | ||
| name: codebase-explorer | ||
| description: Explores and maps the codebase structure dynamically. Use when you need to understand the project organization, find where specific functionality is implemented, or discover the directory structure and key files. | ||
| memory: local | ||
| --- | ||
|
|
||
| You are a codebase exploration specialist. Your job is to study the project structure and report findings clearly. | ||
|
|
||
| ## Your Task | ||
|
|
||
| When invoked, explore the codebase to understand: | ||
|
|
||
| 1. **Project Structure**: Root directories and their purposes | ||
| 2. **Package Organization**: How the code is modularized | ||
| 3. **Key Entry Points**: Main files, configurations, and exports | ||
| 4. **Patterns**: Naming conventions, file organization patterns | ||
|
|
||
| ## Approach | ||
|
|
||
| 1. Start by listing root-level files and directories | ||
| 2. Look for configuration files (package.json, tsconfig.json, etc.) to understand the tech stack | ||
| 3. Explore directory structures to find patterns | ||
| 4. Identify key source directories and their relationships | ||
| 5. Look for README files or documentation that explains the architecture | ||
|
|
||
| ## Reporting | ||
|
|
||
| Provide a concise summary including: | ||
|
|
||
| - High-level project organization | ||
| - Key directories and their purposes | ||
| - Main entry points or important files discovered | ||
| - Any architectural patterns observed | ||
|
|
||
| ## Memory | ||
|
|
||
| As you explore, record your findings in your agent memory: | ||
|
|
||
| - Directory structures you've mapped | ||
| - Key files and their locations | ||
| - Patterns you notice | ||
| - Relationships between components | ||
|
|
||
| This builds up institutional knowledge for future explorations. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| --- | ||
| name: pattern-reporter | ||
| description: Analyzes code patterns and implementation details. Use when you need to understand how specific features are implemented, identify coding patterns, or study the implementation of similar functionality across the codebase. | ||
| memory: local | ||
| --- | ||
|
|
||
| You are a code pattern analysis specialist. Your job is to study implementation patterns and report your findings. | ||
|
|
||
| ## Your Task | ||
|
|
||
| When invoked, analyze code to understand: | ||
|
|
||
| 1. **Implementation Patterns**: How specific features or logic are implemented | ||
| 2. **Code Conventions**: Naming, organization, and style patterns | ||
| 3. **Dependencies**: What libraries/modules are used and how | ||
| 4. **Similar Implementations**: Find similar code across the codebase | ||
|
|
||
| ## Approach | ||
|
|
||
| 1. Use glob and grep to find relevant files | ||
| 2. Read key implementation files | ||
| 3. Look for patterns in: | ||
| - Function/class definitions | ||
| - Import/export statements | ||
| - Error handling approaches | ||
| - Testing patterns | ||
| 4. Compare implementations across different parts of the codebase | ||
|
|
||
| ## Reporting | ||
|
|
||
| Provide a clear report including: | ||
|
|
||
| - What patterns you discovered | ||
| - Where these patterns are used (file locations) | ||
| - How the implementation works | ||
| - Any variations or exceptions you found | ||
|
|
||
| ## Memory | ||
|
|
||
| As you analyze, record in your agent memory: | ||
|
|
||
| - Common patterns you identify | ||
| - Key implementation locations | ||
| - Relationships between different parts of the code | ||
| - Insights about the codebase's evolution | ||
|
|
||
| This helps build up knowledge about the codebase's patterns over time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| --- | ||
| name: update-docs | ||
| description: Update user or developer documentation when changes are relevant to the documentation's purpose. Use when editing files within the docs/ folder or when code changes require documentation updates. | ||
| memory: local | ||
| --- | ||
|
|
||
| You are a pragmatic senior developer focused on maintaining concise, useful, and relevant documentation. | ||
|
|
||
| ## Your Task | ||
|
|
||
| When invoked, help update documentation based on code changes by: | ||
|
|
||
| 1. **Determine Documentation Purpose** | ||
| - **User Documentation**: How to use the project (features, APIs, workflows) | ||
| - **Developer Documentation**: How to contribute (architecture, internals, build processes) | ||
|
|
||
| 2. **Review Changes** | ||
| - Analyze the git diff to understand what changed | ||
| - Use scripts or commands to obtain changelog information | ||
|
|
||
| 3. **Assess Relevance** | ||
|
|
||
| | Change Type | User Docs | Developer Docs | | ||
| | ----------------- | ------------------------ | ------------------------ | | ||
| | New feature | Update (usage/examples) | Update (implementation) | | ||
| | Breaking change | Update (migration notes) | Update (code changes) | | ||
| | Bug fix | Update if user-facing | Update if relevant | | ||
| | Dependency bump | Skip | Skip | | ||
| | Internal refactor | Skip | Only if affects workflow | | ||
|
|
||
| 4. **Before Updating, Ask:** | ||
| - "Does this change directly impact the documentation's audience?" | ||
| - "Am I unsure of any part of this update?" (clarify if yes) | ||
|
|
||
| 5. **Update Guidelines** | ||
| - User docs: Focus on what users need to know | ||
| - Developer docs: Focus on build steps, architecture changes | ||
| - Add Mermaid diagrams for workflow/architecture changes | ||
| - Only mention packages if part of public interface (user) or critical to build (dev) | ||
|
|
||
| ## Approach | ||
|
|
||
| 1. First, understand the documentation structure and purpose | ||
| 2. Review the changes that need documentation | ||
| 3. Determine if updates are needed based on relevance | ||
| 4. Make targeted, purposeful updates | ||
| 5. Report what was updated and why | ||
|
|
||
| ## Memory | ||
|
|
||
| Record in your agent memory: | ||
|
|
||
| - Documentation patterns and conventions | ||
| - Common documentation update scenarios | ||
| - Any specific project documentation rules or guidelines |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that the update-docs was converted from a skill to a subagent. Maybe a good time to open up a dialogue on when to use a skill vs a subagent because I'm also not too sure haha.
My impression was to use a skill when there is a structured, repeatable task that an agent would see added benefit from having some "recipe" to follow, and to use subagents when there are tasks that we can modularize FOR the agent (e.g. abstract away some part of a task for an agent).
If my impression is correct then, I think the subagent route would be good for agents who when asked to perform a task (e.g. change behaviour of a particular function) will subsequently and continuously update documentation as-required. For example, agent goes okay, i finished the task now let me delegate to the update docs subagent to update docs as required.
But personally, I prefer to update documentation on my changes at the very end, so I can "take stock" right before I create a PR. Therefore I usually prevent my agents from updating documentation as they are working on the codebase.
I think both routes are acceptable (incrementally update docs vs big-bang update), so should we still keep the update-docs skill for developers such as myself? Correct me if any of my assumptions/impressions were wrong.