一键导入
configure-skills
Generates project-specific create-*/run-* skills and scoped rules from the current codebase. Used during /5:implement CONFIGURE.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generates project-specific create-*/run-* skills and scoped rules from the current codebase. Used during /5:implement CONFIGURE.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Analyzes the codebase, creates project documentation, generates a rebuildable codebase index, and updates AGENTS.md. Used during /5:implement CONFIGURE.
Navigate the .5/index/ codebase index to quickly identify target files and understand project structure. Use before running broad Glob/Grep scans when you need to find where a feature lives, where new code should go, which routes exist, or what the data model looks like.
Generates concise README.md files for monorepo modules by analyzing module structure, dependencies, key components, and testing patterns. Use when creating module documentation, documenting architecture, updating READMEs, or when user asks to generate/create README for a module.
| name | configure-skills |
| description | Generates project-specific create-*/run-* skills and scoped rules from the current codebase. Used during /5:implement CONFIGURE. |
| allowed-tools | Read, Write, Bash, Glob, Grep, create-skill, scaffold-skill |
| model | sonnet |
| user-invocable | false |
This skill handles skill and rule generation during implementation for the CONFIGURE feature. It is called by step-executor to create project-specific skills and scoped rules.
It handles two tasks:
.claude/rules/*.md files with file-type-specific directivesNote: config.json is written directly by /5:configure during the Q&A phase.
This skill supports two modes. The skill generation and rule generation logic is the same in both modes — only the input source changes.
Used by /5:configure → /5:implement CONFIGURE flow.
.5/features/CONFIGURE/plan.md)Used by /5:reconfigure for lightweight refresh.
In both modes, the generation logic is identical — only where the requested skill/rule list comes from differs.
If tools.skillCreator.available is true in .5/config.json, use the skill-creator plugin's tools (e.g., create-skill, scaffold-skill) to generate each SKILL.md instead of the template-based approach below. Pass the extracted patterns, conventions, and example file paths as context to the skill-creator tool so it can produce structured, high-quality skill files.
If skill-creator is not available, use the existing template-based generation below — no degradation in workflow behavior.
Reads: Pattern selections from unified plan (.5/features/CONFIGURE/plan.md)
Creates: SKILL.md files in .claude/skills/{name}/SKILL.md
Skills are determined by what patterns exist in the codebase (detected during /5:configure) and what the user selected — not by project type.
For EACH pattern selected by the user in the unified plan:
For each skill, create .claude/skills/{pattern}/SKILL.md:
---
name: {pattern}
description: Creates or updates a {Pattern} following project conventions at {location}.
allowed-tools: Read, Write, Glob, Grep
model: haiku
user-invocable: true
---
# {Pattern}
## What This Skill Does
Creates or updates a {pattern} following this project's conventions.
## Detected Conventions
- **Location:** {detected-location}
- **Naming:** {detected-naming-pattern}
- **Structure:** {detected-structure}
- **Imports:** {detected-import-pattern}
## Template
Based on {example-file}, {patterns} should follow:
\`\`\`{language}
{template-derived-from-analysis}
\`\`\`
## Checklist
- [ ] File at correct location
- [ ] Naming convention followed
- [ ] Required imports added
- [ ] {pattern-specific-items}
Rule: Skill name is {pattern} (e.g., controller → controller, component → component, dto → dto). For compound patterns, use the short form: model/entity → model, api-route → api-route.
Reads: Command selections from unified plan (.5/features/CONFIGURE/plan.md)
Creates: SKILL.md files in .claude/skills/run-{command}/SKILL.md
For EACH command selected by the user in the unified plan:
For each skill, create .claude/skills/run-{command}/SKILL.md:
---
name: run-{command}
description: Runs {command} for this project using {source}.
allowed-tools: Bash
model: haiku
user-invocable: true
---
# Run {Command}
## What This Skill Does
Executes the project's {command} command.
## Command
\`\`\`bash
{exact-command}
\`\`\`
## Variants
{if variants exist}
- `{variant1}` - {description}
- `{variant2}` - {description}
## Common Options
- `--watch` - Run in watch mode (if available)
- `--coverage` - Generate coverage report (for tests)
- `--fix` - Auto-fix issues (for lint/format)
## Expected Output
{describe what success/failure looks like}
## Error Handling
- If command fails, report the error output
- Common issues: {list common problems and solutions}
Rule: Skill name is run-{category} (e.g., build → run-build, test/spec → run-tests, lint → run-lint). Group variants under the primary category name.
If rules.generate is true in .5/config.json, generate .claude/rules/ files with project-specific conventions scoped to relevant file types.
Rules are concise directives (15-40 lines each), not documentation. Documentation lives in .5/*.md files. Rules tell Claude what to do when working with specific file types.
Based on the codebase analysis results, determine which rules apply:
| Rule File | Generate When | Source Analysis |
|---|---|---|
code-style.md | Always (if source files exist) | Conventions Analysis |
testing.md | Test files detected | Testing Analysis |
api-patterns.md | Controller/route/handler patterns detected | Architecture Analysis |
dependencies.md | External integrations detected | Integration Analysis |
Skip any rule whose prerequisite patterns were not detected. Do not generate empty or placeholder rule files.
For each applicable rule:
paths: globs from detected file locations (e.g., if tests are at src/**/*.test.ts and tests/**/*.spec.ts, use those patterns)AGENTS.mdWrite files to .claude/rules/:
mkdir -p .claude/rules
Each rule file uses YAML frontmatter with paths: for scoping. Rules without paths: load unconditionally.
Example — testing.md:
---
paths:
- "**/*.test.ts"
- "**/*.spec.ts"
---
# Testing Conventions
- Use `describe`/`it` blocks with descriptive names
- Mock external dependencies with jest.mock, never mock internal modules
- Use factory functions from `tests/factories/` for test data
- Each test file mirrors its source file path: `src/foo/Bar.ts` → `src/foo/__tests__/Bar.test.ts`
- Assert one behavior per test
Example — code-style.md:
---
paths:
- "src/**/*.{ts,tsx}"
---
# Code Style
- Use PascalCase for classes and types, camelCase for functions and variables
- Import order: external packages → internal modules → relative imports
- Use absolute imports with `@/` alias
- Prefer named exports over default exports
Example — dependencies.md (unconditional):
# Dependency Conventions
- Database access through Prisma client only, never raw SQL
- HTTP requests use axios instance from `src/lib/http.ts`
- Environment variables accessed via `src/config/env.ts`, never `process.env` directly
When running in REFRESH MODE:
Returns structured results for each component:
Component B (Pattern Skills): SUCCESS - Generated 3 create-* skills (create-component, create-hook, create-context)
Component C (Command Skills): SUCCESS - Generated 2 run-* skills (run-tests, run-lint)
Component D (Rules): SUCCESS - Generated 3 rule files (code-style, testing, dependencies)
Or on failure:
Component B (Pattern Skills): FAILED - No patterns found in codebase
Component D (Rules): SKIPPED - rules.generate is false in config
steps in config.jsonAGENTS.md in rule files