project-skill-writer
Project Skill Writer
Design Philosophy: Users don't know what a "skill" is or how to describe one. They know their problems. This skill transforms problem descriptions into working skills.
When to Use
Invoke when:
- User describes a recurring frustration or repetitive task
- User says "create a skill", "I keep doing X manually", "I wish AI would automatically..."
- User provides a workflow that could be standardized
Do NOT invoke when:
- User wants an agent (delegate to
project-agent-writer) - User wants to install an existing skill (delegate to
project-skill-installer) - User wants a rule, not a skill (delegate to
trae-rules-writer) - One-off request with no reuse potential
Prerequisites
- Node.js >= 18
- Target project must have a writable directory (defaults to
.trae/skills/)
Workflow
[L1: Problem Understanding]
↓
[L2: Project Analysis] ← parallel sub-agents
↓
[L3: Skill Design]
↓
[L4: Validate with User] ← WAIT for confirmation
↓
[L5: Generation]
↓
[L6: Quality Gates]
L1: Problem Understanding
Extract the problem, classify it, and infer skill metadata — do NOT ask the user to define these.
| Problem Pattern | Skill Type | Example |
|---|---|---|
| "I write the same code every time" | Generator | Component generator, API client |
| "I do the same check every time" | Validator | Linter, security scanner |
| "I explain the same thing every time" | Informer | Architecture docs, API docs |
| "I follow the same steps every time" | Workflow | Deployment, release process |
| "I find and fix the same issues" | Remediation | Bug fixer, refactorer |
Ask ONLY when multiple valid solutions exist and user preference matters. NEVER ask "What do you want the skill to do?" — infer from the problem.
L2: Project Analysis Pipeline
Launch these agents in parallel via the Task tool (they are independent):
| Agent | Purpose | Tool Invocation |
|---|---|---|
| Project Scanner | Structure, existing assets, patterns | Task(subagent_type="search", query="...") |
| Tech Stack Analyzer | Language, framework, build tools | Task(subagent_type="search", query="...") |
| Convention Detector | Naming, imports, code style | Task(subagent_type="search", query="...") |
Combine their outputs into a unified project profile before proceeding to design.
L3: Skill Design
Based on Problem + Project Analysis, produce a design spec:
## Skill: {name}
### Problem Solved
{1-sentence description of the problem this skill solves}
### Triggers
- {trigger 1}
- {trigger 2}
### Architecture
- Input: {what the skill takes}
- Output: {what the skill produces}
- Process: {how the skill works}
### Project Integration
- Output path: {project-relative path}
- Conventions: {from project analysis}
### Quality Criteria
- {measurable success criteria}
Design Principles:
- Single Responsibility — one skill = one problem solved
- Convention-Aligned — use project's naming, structure, patterns
- Minimal Friction — triggers should match natural language
- Verifiable Output — clear success/failure criteria
L4: Validation
Before generating, show user:
I'll create a skill that:
Problem: {user's problem in their words}
Solution: {what the skill will do}
Triggers: {when it activates}
Output: {files it will create}
Is this correct? Should I adjust anything?
WAIT for user confirmation before generating.
L5: Generation
After user confirmation:
- Scaffold: Run
scripts/init_skill.cjswith--problemflag, or create files manually using skill.md.template - Populate: Inject project-specific conventions from L2 analysis into SKILL.md sections
- Reference files: Create
references/,assets/,scripts/only when the skill needs them - Path: Determine output path using Path Discovery — always project-relative
Fallback: If init_skill.cjs fails or the template doesn't fit, write SKILL.md directly following the template structure.
L6: Quality Gates
Run Quality Validator against the generated skill.
Minimum checks before delivery:
- Skill has meaningful triggers (not just filename)
- Output path is project-relative, not global
- Frontmatter has
nameanddescription - Workflow is executable (not just abstract steps)
- Dependencies are declared
- Examples show real usage
Error Handling
| Issue | Solution |
|---|---|
| Cannot detect tech stack | Ask user for language/framework, or scan for file extensions |
| Project too large (>500 top-level items) | Use focus_folders parameter in Project Scanner |
| Conflicting existing skill found | Show comparison, ask user: extend existing or create new? |
| User problem maps to multiple skill types | Present top-2 candidates with trade-offs, let user pick |
| Path discovery finds no markers | Default to .trae/skills/ in project root |
| Generated skill fails quality gates | Show failing checks, auto-fix what's possible, flag the rest |
Output Contract
Always produce four sections:
- Problem Understanding: What problem you identified
- Solution Design: The skill architecture
- Deliverables: Files created
- Usage Guide: How to trigger and use the skill
Agents
- Project Scanner: Structure and pattern analysis
- Tech Stack Analyzer: Language/framework detection
- Convention Detector: Code style extraction
- Quality Validator: Post-generation validation
References
- Path Discovery: Output path determination (load AFTER design)
- Advanced Patterns: Skill architecture patterns (workflow, domain, template, multi-variant)
More from learnwy/skills
english-learner
Use this skill on EVERY user message written in English to auto-detect grammar, word choice, and expression issues — teach corrections before proceeding with the task. Also use when the user looks up a single word, asks about a phrase like 'break the ice', requests translation, or asks for quiz/review. Triggers on: any English message, single English words, idioms, '查单词', '学英语', 'what does X mean', vocabulary review. Stores vocabulary in ~/.english-learner/ with mastery tracking and spaced repetition.
314memory-manager
Cross-session memory for AI. ALWAYS load this skill at session start to read SOUL.md and USER.md. This skill should be loaded for EVERY conversation to maintain continuity. Also triggers on "save memory", "end session", "update memory" for saving. Handles session history creation, memory consolidation, and USER.md/SOUL.md updates. Memory stored in ~/.learnwy/ai/memory/.
220trae-rules-writer
Use this skill when the user wants to create or update Trae IDE rules (.trae/rules/*.md) for AI behavior constraints. Use for: code style enforcement, naming conventions, commit message formats, or making the AI always follow specific patterns. NOT for skills (use project-skill-writer) or agents (use project-agent-writer). Triggers on: 'create rule', 'add rule', 'set up code style', 'enforce convention', 'configure AI behavior', 'AI rule', 'always do X', or when the user wants consistent AI behavior across sessions.
88knowledge-consolidation
Use this skill when the user wants to save, summarize, or persist knowledge from the current AI conversation into structured documents. Captures debugging breakthroughs, architecture decisions, patterns, and lessons learned. Triggers on: '总结一下', '记录下来', 'save this knowledge', 'document this', 'we figured it out', 'that was hard to solve', 'remember this', 'write this down', or when a hard-won insight should be preserved for future sessions. Saves to .trae/knowledges/, .claude/knowledges/, or .cursor/knowledges/ based on AI IDE.
59requirement-workflow
Structured software development workflow orchestrator using Spec-Driven Development (SDD). Transforms vague requirements into spec.md → tasks.md → implementation → verification. Triggers on: '开发功能', '实现这个', 'build this feature', 'implement', 'add new module', 'fix bug', 'develop', 'create feature'.
56trae-skill-writer
Create Trae IDE skills (SKILL.md files) for reusable AI capabilities. Use when user wants to: create a skill, make a reusable workflow, automate repetitive tasks, turn a conversation into a skill, or encapsulate a process for AI to follow. Triggers on: '创建 skill', 'write a SKILL.md', 'make this reusable', '.trae/skills/', 'I keep doing the same thing every time'. Do NOT use for rules (use trae-rules-writer) or agents (use trae-agent-writer).
31