implementing-agent-skills
npx machina-cli add skill yu-iskw/coding-agent-skills/implementing-agent-skills --openclawImplementing Agent Skills
Purpose
This skill implements new Agent Skills by identifying the target AI coding tool, ensuring specification compliance, and applying templates and best practices so the created skill is compatible with the user's workflow.
Implementation Workflow
Copy this checklist and track progress:
Implementation Progress:
- [ ] Step 1: Identify AI coding tool
- [ ] Step 2: Choose or create skill directory (name matches frontmatter)
- [ ] Step 3: Select template and adapt frontmatter (name, description)
- [ ] Step 4: Write instructions; keep SKILL.md under 500 lines
- [ ] Step 5: Add references/assets as needed; keep links one level deep
- [ ] Step 6: Validate (YAML, skills-ref if available, keyword-rich description)
1. Identify AI Coding Tool
Check the project for indicators of AI coding tools:
- Cursor: Presence of
.cursor/directory,.cursorrules, or.cursorignore. - Claude Code: Presence of
.claude/directory orclaude.json. - Gemini CLI: Presence of
gemini.jsonor specific environment variables.
Logic
- Scan the workspace root for these indicators.
- Analyze the findings:
- If one tool is detected -> Proceed with that tool as the target.
- If multiple tools are detected -> Ask the user which tool to target.
- If no tools are detected -> Ask the user to specify the tool.
2. Interaction Strategy
If you need to ask the user, use the AskQuestion tool if available, or ask conversationally.
Example Question: "I detected multiple AI coding tools (Cursor and Claude Code). Which one should I target for this Agent Skill?"
- Cursor
- Claude Code
- Gemini CLI
3. Implementation Context
Once the tool is identified, tailor the Agent Skill implementation accordingly:
-
Cursor:
- Target:
.cursor/skills/(project) or~/.cursor/skills/(global). - Format: Standard
SKILL.mdwith YAML frontmatter.
- Target:
-
Claude Code:
- Target:
.claude/skills/(project) or~/.claude/skills/(global). - Format: Follow Claude Code skill conventions.
- Target:
-
Gemini CLI:
- Follow Gemini CLI specific skill structure.
4. Standards & Templates
When implementing a new skill, always follow the established best practices and select the most appropriate template as a starting point.
Specification Compliance
Ensure the skill follows the official Agent Skills specification:
- Naming: Directory and
namein frontmatter must match; use gerund form (e.g.processing-pdfs,implementing-agent-skills). Lowercase letters, numbers, and hyphens only; no leading/trailing hyphens or consecutive hyphens. - Description: Write in third person; describe what the skill does and when to use it; include keywords for discovery (max 1024 characters).
- Frontmatter: Include required
nameanddescription. Add optionallicense,compatibility,metadata,allowed-toolsif applicable. - Structure: Keep SKILL.md under 500 lines. Use
scripts/,references/, andassets/for progressive disclosure; keep file references one level deep from SKILL.md.
Validation
Before completing the task:
- Check Syntax: Verify YAML frontmatter is valid.
- Validate: If the
skills-reftool is available, runskills-ref validate ./<skill-directory>. - Manual Review: Ensure the
descriptionis keyword-rich for discovery.
Best Practices
See references/best-practices.md for detailed naming, description, and progressive disclosure standards.
Available Templates
Select the template that best matches the skill's purpose:
| Template | Purpose |
|---|---|
| generic.md | Standard boilerplate for any skill. |
| cli-tool-wrapper.md | Wrapping CLI tools with help checks and safety. |
| sop-workflow.md | Checklists and SOPs for hybrid/manual processes. |
| library-upgrade.md | Safe, multi-step dependency upgrades. |
| code-review.md | Reviewing code against project standards. |
| security-audit.md | Systematic vulnerability scanning and reporting. |
| fixer-loop.md | Autonomous "test-analyze-fix" loops (TDD/Lint). |
| docs-sync.md | Keeping documentation in sync with source code. |
Source
git clone https://github.com/yu-iskw/coding-agent-skills/blob/main/.cursor/skills/implementing-agent-skills/SKILL.mdView on GitHub Overview
This skill provides a structured approach to creating Agent Skills by identifying the target AI coding tool (Cursor, Claude Code, Gemini CLI), ensuring specification compliance, and applying templates. It standardizes naming, frontmatter, and documentation so new skills integrate smoothly with workflows and are easy to discover.
How This Skill Works
It scans the workspace for tool indicators (.cursor/, .claude/, gemini.json) to determine the target tool. Then it follows a concrete implementation flow: create or select a skill directory named to match the frontmatter, adapt the frontmatter (name, description), write instructions within 500 lines, add references/assets one level deep, and validate YAML with optional skills-ref checks.
When to Use It
- When starting a brand-new Agent Skill and you need a tool-aware template
- When authoring or updating frontmatter (name, description) to ensure spec compliance
- When implementing a skill to match an identified AI coding tool (Cursor, Claude Code, Gemini CLI)
- When multiple AI coding tools are detected and you need to choose the target
- When assessing how to format or explain Agent Skills for newcomers (e.g., questions about SKILL.md)
Quick Start
- Step 1: Identify AI coding tool by scanning the project for Cursor/Claude/Gemini indicators
- Step 2: Create or select the skill directory, ensuring the name matches the frontmatter
- Step 3: Choose a template, adapt frontmatter, write concise instructions (≤500 lines), and validate
Best Practices
- Use gerund form for directory and slug, e.g., implementing-agent-skills
- Write a keyword-rich, third-person description (<= 1024 chars) and ensure frontmatter is valid YAML
- Keep SKILL.md under 500 lines and organize with scripts/, references/, assets/ with one-level-deep references
- Validate YAML syntax and run skills-ref validation when available
- Tailor implementation to the identified AI tool (Cursor, Claude Code, Gemini CLI) and adhere to its conventions
Example Use Cases
- Create a new 'processing-pdfs' skill for Cursor by adapting .cursor/skills and frontmatter
- Add a Claude Code skill using .claude/skills and Claude Code conventions
- Implement a Gemini CLI skill following Gemini CLI structure
- Resolve a project with multiple AI tools by prompting the user to pick one
- Update an existing skill's description to improve keyword coverage and discovery