Agent skill
generate-spec
Generates app_spec.txt specification files from codebases. Use when you need to create specification documents, analyze code structure, document project architecture, or generate comprehensive project overviews in XML format.
Install this agent skill to your Project
npx add-skill https://github.com/AhamSammich/auto-code/tree/main/skill/generate-spec
SKILL.md
Generate App Specification
Create comprehensive app specification files that document codebase structure, architecture, features, and implementation details in a standardized XML format.
When to Use
- Documenting an existing project
- Creating specs for handoff or onboarding
- Generating architecture documentation
- Analyzing unfamiliar codebases
Output Format
Generate XML following this structure (standard depth by default):
<project_specification>
<project_name>Name</project_name>
<overview>2-3 sentence description</overview>
<technology_stack>
<runtime>...</runtime>
<language>...</language>
<framework>...</framework>
<key_dependencies>...</key_dependencies>
</technology_stack>
<core_features>
<feature>
<name>...</name>
<description>...</description>
<location>...</location>
</feature>
</core_features>
<file_structure>
<directory name="...">
<key_files>...</key_files>
</directory>
</file_structure>
<configuration>...</configuration>
<running_the_project>...</running_the_project>
</project_specification>
Exploration Strategy
Step 1: Discover Project Type
Check for manifest files to identify the project:
| File | Project Type |
|---|---|
package.json |
Node.js / JavaScript / TypeScript |
Cargo.toml |
Rust |
go.mod |
Go |
pyproject.toml / requirements.txt |
Python |
pom.xml / build.gradle |
Java |
Gemfile |
Ruby |
composer.json |
PHP |
Read the manifest to identify:
- Project name and description
- Dependencies and dev dependencies
- Scripts/commands available
- Entry points
Step 2: Map Structure
- Use
treeorfindto get directory layout (exclude node_modules, .git, etc.) - Identify key directories:
src/,lib/,app/- source codetest/,tests/,__tests__/- testsconfig/,.config/- configurationpublic/,static/,assets/- static filesdocs/- documentation
- Count files by type to understand composition
Step 3: Analyze Architecture
-
Find and read entry points:
main.ts,index.ts,app.ts(TypeScript)main.js,index.js,app.js(JavaScript)main.py,app.py,__main__.py(Python)main.go,cmd/*/main.go(Go)src/main.rs,src/lib.rs(Rust)
-
Trace imports to understand module structure
-
Look for:
- Route definitions (API endpoints)
- Database models/schemas
- Configuration patterns
- Authentication/authorization
- Middleware
Step 4: Extract Features
- Read
README.mdfor stated features and usage - Analyze route handlers for actual features
- Check for integrations (OAuth, external APIs, etc.)
- Document UI components if frontend exists
- Note CLI commands if applicable
Step 5: Generate Spec
- Create
app_spec.txtin project root - Use XML format from TEMPLATES.md
- Include all discovered information
- Add file paths for key components
- Document how to run the project
Quality Guidelines
- Be specific: Include actual file paths, not generic descriptions
- Be accurate: Only document what exists, never invent features
- Be complete: Cover all major components and entry points
- Be concise: Standard depth covers essentials without exhaustive detail
- Be actionable: Include commands to install, build, run, and test
Depth Levels
When user requests different depths:
- Quick: project_name, overview, technology_stack (basics only), core_features (names only)
- Standard (default): All sections with moderate detail
- Comprehensive: Add database_schema, api_endpoints_summary, ui_layout, implementation_steps, success_criteria
Integration with auto-code
After generating app_spec.txt, the user can run:
auto-code build ./app_spec.txt
Completion Message
When you finish generating the app_spec.txt file, show the user:
Done! I've generated app_spec.txt at the project root.
The spec is ready to use:
auto-code build ./app_spec.txt
IMPORTANT: The correct command is auto-code build (the package binary is auto-code, not autonomous-coding, and it uses subcommands like build and extend)
See Also
- TEMPLATES.md - XML templates by project type and depth
- EXAMPLES.md - Complete example specifications
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
generate-feature-spec
Generates features_spec.txt files for use with auto-code extension mode. Analyzes existing codebase and creates structured feature specifications based on user requirements.
setup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
git-guardrails-claude-code
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
obsidian-vault
Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.
scaffold-exercises
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
Didn't find tool you were looking for?