agentleFS
ThisIsSadeghiThisIsSadeghi/KMPilot/.claude/skills/create-feature/SKILL.md

create-feature

Skill56 starsChanged 3 months agoMITView on GitHub

Creates complete KMP features with Clean Architecture through PRD generation, task breakdown, orchestrated implementation, and spec-driven cleanup. Invoke with /create-feature.

We split this skill into the rules it gives an agent

9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before editing any feature files, activate the skill marker so the PreToolUse hook allows edits:

    line 14
  2. Distinctive:

    After Phase 5 completes (or on any early exit), remove it:

    line 18
  3. Distinctive:

    Check for a Stitch design blueprint:

    line 33
  4. Distinctive:

    If entering design-aware mode, log:

    line 45
  5. Very specific:

    If blueprint exists and blueprintConsumed == false, the blueprint's Pre-Implementation Contract will auto-populate the UI section of the …

    line 51
  6. Distinctive:

    Design-aware note: If blueprint exists, incorporate the blueprint's design tokens, component tree, and color audit into the PRD's UI …

    line 58
  7. Distinctive:

    Verify spec.md → Remove prd.md + tasks.md + task-*.md See: @phases/phase-5-cleanup.md

    line 80
  8. Distinctive:

    User Confirmation Required: after Phase 2 and Phase 3 - never proceed without explicit approval

    line 85
  9. Very specific:

    Validate build: after each layer: ./gradlew :feature:{featurename}:assembleAndroidMain

    line 87

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create Feature

Orchestrates complete feature creation using a 6-phase workflow.

Architecture Reference: @../_shared/patterns.md

Hook Marker (Required)

Before editing any feature files, activate the skill marker so the PreToolUse hook allows edits:

touch /tmp/.claude-kmpilot-skill-active

After Phase 5 completes (or on any early exit), remove it:

rm -f /tmp/.claude-kmpilot-skill-active

Workflow

Phase 0 → Phase 1 → Phase 2 → [USER CONFIRMS] → Phase 3 → [USER CONFIRMS] → Activate marker → Phase 4 → Phase 5 → Remove marker → Done

Phase 0: Context Discovery (Auto)

Detect: PKG_PREFIX, INIT_KOIN_PATH, NAV_HOST_PATH from existing features. See: @phases/phase-0-context.md

Phase 1: Design Artifact Detection

Check for a Stitch design blueprint:

  1. Check blueprint exists: .claude/docs/{featurename}/designs/{featurename}_blueprint.md
  2. Check stitch-project.json: .claude/docs/_project/stitch-project.json — read features[featurename].blueprintConsumed
  3. Determine mode:
Blueprint exists?blueprintConsumedMode
YesfalseDesign-aware mode — blueprint drives UI layer
YestrueNormal mode — blueprint already consumed
NoN/ANormal mode — no design artifact

If entering design-aware mode, log:

Design artifact detected: .claude/docs/{featurename}/designs/{featurename}_blueprint.md
Entering design-aware mode. Blueprint will drive UI layer implementation.

If blueprint exists and blueprintConsumed == false, the blueprint's Pre-Implementation Contract will auto-populate the UI section of the PRD in Phase 2.

Phase 2: PRD Generation

Analyze prompt → Generate PRD → Save to .claude/docs/{featurename}/prd.md Template: @templates/prd-simple.md or @templates/prd-complex.md See: @phases/phase-2-prd.md

Design-aware note: If blueprint exists, incorporate the blueprint's design tokens, component tree, and color audit into the PRD's UI section automatically.

Phase 3: Task Generation

Break PRD into tasks → Assign to agents → Save task files Template: @templates/task-template.md See: @phases/phase-3-tasks.md

Phase 4: Implementation

Parallel (recommended): Data + UI agents together → Integration agent Sequential: Data → UI → Integration See: @phases/phase-4-implementation.md

AgentLayerRuns
data-layerModels, DataSource, Repository, KtorFirst (or parallel) — network/mixed only
platformPlatform capability: commonMain DataSource + per-platform actuals + platformModule (Rule 14)First (or parallel) — platform-capability/native-view/mixed only
ui-layerUiModel, ViewModel, Screens, Navigation (+ expect/actual native view for Rule 14)Second (or parallel)
integratorDI, 4 integration points (+ first-feature Welcome handoff), spec.mdLast

The agent set is selected by the feature's Platform Profile tag (Phase 2, Step 2.1b). A plain network feature runs the original three (no platform). See phases/phase-4-implementation.md → "Agent Set by Platform Profile".

Phase 5: Cleanup

Verify spec.md → Remove prd.md + tasks.md + task-*.md See: @phases/phase-5-cleanup.md

Critical Rules

  1. User Confirmation Required after Phase 2 and Phase 3 - never proceed without explicit approval
  2. Documentation: .claude/docs/{featurename}/ - PRD/tasks ephemeral, spec.md permanent
  3. Validate build after each layer: ./gradlew :feature:{featurename}:assembleAndroidMain

Error Handling

On build failure, load troubleshooting:

  • Data: @troubleshooting/data.md
  • UI: @troubleshooting/ui.md
  • Integration: @troubleshooting/integration.md

Completion Report

## Feature Complete: {FeatureName}
- Data layer implemented
- UI layer implemented
- Integration complete (4 points)
- Build passing + ktlint formatted
- @Preview composables present in UI files
- Living spec: .claude/docs/{featurename}/spec.md
- Ephemeral artifacts cleaned
- Navigate: navController.navigate({FeatureName}Route)
{Design-aware: "- blueprintConsumed set to true in stitch-project.json"}

---

> **Next step —** run `/clear` to free the context window (the spec + design blueprint are durable artifacts — the next skill re-reads them fresh, so clearing loses nothing), then `/review-feature {featurename}` to validate against Clean Architecture guidelines — or `/verify-ui {featurename}` to audit against the Stitch design if this feature was built design-aware.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.