home / skills / alekspetrov / navigator / nav-skill-creator

nav-skill-creator skill

/skills/nav-skill-creator

This skill generates feature boilerplate by analyzing existing patterns, scaffolding files, tests, and documentation for rapid feature delivery.

npx playbooks add skill alekspetrov/navigator --skill nav-skill-creator

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
12.5 KB
---
name: example-feature-generator
description: Generate boilerplate for new features following project conventions. Use when user says "create feature", "add feature", or "new feature scaffolding".
allowed-tools: Read, Write, Edit, Grep, Glob, Bash
version: 1.0.0
---

# Example Feature Generator

This is an example of a generated skill created by nav-skill-creator.

## When to Invoke

Auto-invoke when user says:
- "Create a new feature"
- "Add feature scaffolding"
- "Generate feature boilerplate"

## What This Does

1. Asks for feature name and type
2. Analyzes existing features for patterns
3. Generates feature files following project conventions
4. Creates tests and documentation

## Execution Steps

### Step 1: Gather Feature Requirements

Ask user:
- Feature name (kebab-case)
- Feature type (API, UI, background job, etc.)
- Dependencies needed
- Testing requirements

### Step 2: Analyze Existing Patterns

Use Task agent to explore codebase:
```
"Find existing features similar to [feature-type]:
 - Locate feature files
 - Identify structure patterns
 - Extract naming conventions
 - Find test patterns"
```

### Step 3: Generate Feature Files

Use predefined function: `functions/feature_generator.py`

```python
# Generates feature structure based on analysis
generate_feature(name, feature_type, config)
```

Creates:
- Feature implementation file
- Test file
- Configuration file (if needed)
- Documentation stub

### Step 4: Validate Generated Files

Check:
- [ ] Files follow naming conventions
- [ ] Imports are correct
- [ ] Tests are generated
- [ ] Documentation is created

### Step 5: Show Summary

Display created files and next steps for user.

---

## Output Format

```
āœ… Feature Created: [feature-name]

Files generated:
- features/[feature-name]/index.ts
- features/[feature-name]/[feature-name].test.ts
- features/[feature-name]/README.md

Next steps:
1. Implement feature logic in index.ts
2. Add test cases in [feature-name].test.ts
3. Document usage in README.md
```

---

**This is an example - actual generated skills will vary based on project patterns**

Overview

This skill generates boilerplate for new features following the project's conventions. It guides the user through naming, feature type, dependencies, and testing requirements, then produces implementation, test, and documentation stubs. The generator inspects existing code patterns to match structure and naming. It returns a concise summary of created files and recommended next steps.

How this skill works

The skill prompts for a kebab-case feature name, feature type (API, UI, background job, etc.), dependencies, and testing needs. It analyzes the codebase to detect similar feature patterns, naming conventions, and test styles. Using those patterns it creates implementation files, test files, optional config, and a documentation stub. Finally it validates file names, imports, and test presence, then shows a summary of generated artifacts.

When to use it

  • When you want consistent scaffolding for a new feature (API, UI, job, etc.).
  • When adding a feature quickly while matching existing project conventions.
  • When you need tests and documentation stubs created alongside implementation files.
  • When onboarding contributors who need repeatable, standardized feature structure.
  • When preparing a small prototype that should follow repository patterns.

Best practices

  • Provide a clear kebab-case feature name and pick the correct feature type.
  • List direct code or external dependencies up front to include proper imports.
  • Review the generated files before implementation to confirm patterns match intent.
  • Run the generated tests scaffold and adjust edge-case cases early.
  • Iterate on the generated README stub to capture usage and integration notes.

Example use cases

  • Create a new API endpoint with request validation, a handler file, and tests.
  • Scaffold a UI feature with component, style, and snapshot test files.
  • Add a scheduled background job with configuration and integration tests.
  • Rapidly generate feature branches for hackathon or prototype work while staying consistent.
  • Onboard a new contributor by giving them a ready-to-fill feature template.

FAQ

Can the generator modify existing files or only create new ones?

It focuses on creating new feature files and stubs; it will not alter existing implementation files without explicit confirmation.

How does it determine project conventions?

It scans existing feature directories and tests to extract naming patterns, file structure, and common imports, then applies those conventions to the new scaffolding.