Instruction Writer
Agent Buildinginstruction-writerInstruction Writer is an Agent Skill for agent building published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Write and optimize instructions for Claude Code (skills, slash commands, memory files, CLAUDE.md). **ALWAYS use before creating or modifying any CLAUDE.md file, SKILL.md file, command file, or instruction documentation.** Triggers when writing skill descriptions, optimizing prompts for clarity/token efficiency, or when user mentions "write a skill", "create a command", "optimize instructions", or "improve this prompt".
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/documents/instruction-writer/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/instruction-writer, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Instruction Writer Skill
Expertise in writing effective instructions for Claude Code using latest prompt engineering best practices.
When to Use This Skill
MANDATORY - Automatically invoked when:
- Creating or modifying ANY CLAUDE.md file (project, global, or package-level)
- Creating or modifying SKILL.md files
- Creating or modifying slash command files
- Creating or modifying any instruction/documentation files meant for Claude
- Optimizing prompts for clarity or token efficiency
- User mentions "write instructions", "create a skill/command", or "optimize this prompt"
Core Principles
Apply all principles from @best-practices.md when writing or optimizing instructions. Key focus areas: clarity & specificity, token efficiency, canonical examples, and actionable steps.
Workflow
For New Instructions
- Understand the purpose and trigger conditions
- Draft clear, specific description (if skill) or title/purpose (if command)
- Structure content with headers/XML tags
- Add canonical examples
- Review for token efficiency
For Optimization
- Read target file first to identify all linked files (@ references)
- Read all linked files from target
- Read @best-practices.md for comparison
- Identify issues: verbosity, unclear structure, weak examples, cross-file redundancy
- Report findings with before/after examples
- Wait for approval before applying changes
- Apply optimizations preserving all salient information
Supporting Files
- @best-practices.md: Comprehensive prompt engineering guidelines for Claude 4.x