-
Notifications
You must be signed in to change notification settings - Fork 1
π Fix agent descriptions for Claude Code YAML parser compatibility #8
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b8034c4
π Fix agent descriptions to work with Claude Code's YAML parser
88b5ebc
π Fix prettier wrapping - actual limit is 75 chars not 88
b52bd64
π Run prettier on entire directory
1ed4320
π Format markdown prose with prettier
4d5bbbb
π Remove anti-patterns from CLAUDE.md per prompt-engineering.mdc
b88d462
π Trigger CI checks
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,56 @@ | ||
| # Creating Claude Code Agents | ||
|
|
||
| When creating custom agent files in `.claude/agents/`, the YAML frontmatter format | ||
| matters. | ||
|
|
||
| ## Valid Frontmatter Format | ||
|
|
||
| ```yaml | ||
| --- | ||
| name: agent-name | ||
| description: "Keep under 88 characters to prevent prettier from wrapping" | ||
| --- | ||
| ``` | ||
|
|
||
| **Critical constraints:** | ||
|
|
||
| - **Single line only** - Claude Code doesn't parse block scalars (`>` or `|`) correctly | ||
| - **Under 88 characters** - Prettier wraps longer lines across repos with different | ||
| configs | ||
| - **Use quotes** - Always quote descriptions to handle special characters like colons | ||
|
|
||
| **What works:** | ||
|
|
||
| - `description: Plain text under 88 chars` | ||
| - `description: "Double quoted under 88 chars"` | ||
| - `description: 'Single quoted under 88 chars'` | ||
|
|
||
| **What does NOT work:** | ||
|
|
||
| - Multi-line descriptions with block scalars (`>` or `|`) | ||
| - Descriptions over 88 characters (will wrap in some prettier configs) | ||
|
|
||
| ## Writing Concise Descriptions | ||
|
|
||
| Keep descriptions focused on WHEN to invoke the agent: | ||
|
|
||
| - β "Invoke for design review of UI changes" | ||
| - β "Invoke for design review of UI changes with Playwright testing across viewports | ||
| checking WCAG compliance..." | ||
|
|
||
| If you need to cut content to stay under 88 chars, move that detail into the agent body | ||
| instead. | ||
|
|
||
| ## Example Agent | ||
|
|
||
| ```yaml | ||
| --- | ||
| name: test-runner | ||
| description: "Invoke to run tests and return focused, context-efficient results" | ||
| --- | ||
| I run tests using the specified test runner (bun, pnpm, pytest, etc) and return a terse | ||
| summary with pass count and failure details only. This preserves your context by | ||
| filtering verbose test output to just what's needed for fixes. | ||
|
|
||
| [Rest of agent prompt...] | ||
| ``` |
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
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
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
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
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,56 @@ | ||
| # Creating Claude Code Agents | ||
|
|
||
| When creating custom agent files in `.claude/agents/`, the YAML frontmatter format | ||
| matters. | ||
|
|
||
| ## Valid Frontmatter Format | ||
|
|
||
| ```yaml | ||
| --- | ||
| name: agent-name | ||
| description: "Keep under 88 characters to prevent prettier from wrapping" | ||
| --- | ||
| ``` | ||
|
|
||
| **Critical constraints:** | ||
|
|
||
| - **Single line only** - Claude Code doesn't parse block scalars (`>` or `|`) correctly | ||
| - **Under 88 characters** - Prettier wraps longer lines across repos with different | ||
| configs | ||
| - **Use quotes** - Always quote descriptions to handle special characters like colons | ||
|
|
||
| **What works:** | ||
|
|
||
| - `description: Plain text under 88 chars` | ||
| - `description: "Double quoted under 88 chars"` | ||
| - `description: 'Single quoted under 88 chars'` | ||
|
|
||
| **What does NOT work:** | ||
|
|
||
| - Multi-line descriptions with block scalars (`>` or `|`) | ||
| - Descriptions over 88 characters (will wrap in some prettier configs) | ||
|
|
||
| ## Writing Concise Descriptions | ||
|
|
||
| Keep descriptions focused on WHEN to invoke the agent: | ||
|
|
||
| - β "Invoke for design review of UI changes" | ||
| - β "Invoke for design review of UI changes with Playwright testing across viewports | ||
| checking WCAG compliance..." | ||
|
|
||
| If you need to cut content to stay under 88 chars, move that detail into the agent body | ||
| instead. | ||
|
|
||
| ## Example Agent | ||
|
|
||
| ```yaml | ||
| --- | ||
| name: test-runner | ||
| description: "Invoke to run tests and return focused, context-efficient results" | ||
| --- | ||
| I run tests using the specified test runner (bun, pnpm, pytest, etc) and return a terse | ||
| summary with pass count and failure details only. This preserves your context by | ||
| filtering verbose test output to just what's needed for fixes. | ||
|
|
||
| [Rest of agent prompt...] | ||
| ``` |
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
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
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
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,56 @@ | ||
| # Creating Claude Code Agents | ||
|
|
||
| When creating custom agent files in `.claude/agents/`, the YAML frontmatter format | ||
| matters. | ||
|
|
||
| ## Valid Frontmatter Format | ||
|
|
||
| ```yaml | ||
| --- | ||
| name: agent-name | ||
| description: "Keep under 88 characters to prevent prettier from wrapping" | ||
| --- | ||
| ``` | ||
|
|
||
| **Critical constraints:** | ||
|
|
||
| - **Single line only** - Claude Code doesn't parse block scalars (`>` or `|`) correctly | ||
| - **Under 88 characters** - Prettier wraps longer lines across repos with different | ||
| configs | ||
| - **Use quotes** - Always quote descriptions to handle special characters like colons | ||
|
|
||
| **What works:** | ||
|
|
||
| - `description: Plain text under 88 chars` | ||
| - `description: "Double quoted under 88 chars"` | ||
| - `description: 'Single quoted under 88 chars'` | ||
|
|
||
| **What does NOT work:** | ||
|
|
||
| - Multi-line descriptions with block scalars (`>` or `|`) | ||
| - Descriptions over 88 characters (will wrap in some prettier configs) | ||
|
|
||
| ## Writing Concise Descriptions | ||
|
|
||
| Keep descriptions focused on WHEN to invoke the agent: | ||
|
|
||
| - β "Invoke for design review of UI changes" | ||
| - β "Invoke for design review of UI changes with Playwright testing across viewports | ||
| checking WCAG compliance..." | ||
|
|
||
| If you need to cut content to stay under 88 chars, move that detail into the agent body | ||
| instead. | ||
|
|
||
| ## Example Agent | ||
|
|
||
| ```yaml | ||
| --- | ||
| name: test-runner | ||
| description: "Invoke to run tests and return focused, context-efficient results" | ||
| --- | ||
| I run tests using the specified test runner (bun, pnpm, pytest, etc) and return a terse | ||
| summary with pass count and failure details only. This preserves your context by | ||
| filtering verbose test output to just what's needed for fixes. | ||
|
|
||
| [Rest of agent prompt...] | ||
| ``` |
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
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
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
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
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
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.