agentleFS
BostonOrangeBostonOrange/claude-code-framework/skills/generate-internal-app/SKILL.md

generate-internal-app

Skill2 starsChanged 6 months agoMITView on GitHub

Adapt the internal Next.js business app template from an app blueprint.

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. About 0 are common, 9 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If no blueprint path is provided, look for docs/app-blueprint.json.

    line 17
  2. Very specific:

    If these are missing, stop and tell the user to re-run setup with the "Internal Next.js Business App" preset.

    line 30
  3. Very specific:

    Ensure appName, usersAndRoles, entities, workflows, permissions, filesBlobNeeds, auditEvents, dashboardsViews, and aiAssistPoints exist.

    line 35
  4. Distinctive:

    Add enums for entity statuses and role/action concepts where useful.

    line 41
  5. Distinctive:

    Add models for blueprint entities.

    line 42
  6. Very specific:

    Keep User, FileObject, and AuditLog unless the blueprint explicitly replaces them.

    line 43
  7. Distinctive:

    Prefer relational foreign keys over denormalized JSON for workflow state.

    line 44
  8. Distinctive:

    Keep Prisma calls inside repositories.

    line 46
  9. Very specific:

    Add create/update/status-transition helpers matching workflows.

    line 48
  10. Very specific:

    Use auth helpers from src/lib/auth.

    line 50
  11. Distinctive:

    Create audit events for every workflow transition.

    line 52
  12. Very specific:

    Keep blob operations behind src/lib/blob/client.ts.

    line 53
  13. Very specific:

    Add queue/table/detail/form views from dashboardsViews.

    line 55
  14. Distinctive:

    Keep operational density appropriate for internal tools.

    line 56
  15. Very specific:

    Update seed data in prisma/seed.ts.

    line 58
  16. Distinctive:

    Never use real PII.

    line 60
  17. Distinctive:

    Add tests where the app has a test harness.

    line 61
  18. Very specific:

    If no harness exists, add a short docs/stories/<feature>/how-to-test.md with manual and typecheck validation.

    line 62
  19. Distinctive:

    Add docs/stories and validation notes.

    line 78

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “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

Generate Internal App

Consume an app blueprint and modify the internal Next.js business app template into a working business application. This skill owns orchestration and code generation steps; keep the app's core architecture inside the app template.

Usage

/generate-internal-app docs/app-blueprint.json
/generate-internal-app docs/app-blueprint.json --feature invoice-approval

If no blueprint path is provided, look for docs/app-blueprint.json. If it is missing, run /app-blueprint first.

Preconditions

The target repo should contain the internal app preset:

  • package.json
  • prisma/schema.prisma
  • src/app/api
  • src/lib/db/prisma.ts
  • src/lib/blob/client.ts
  • src/lib/auth

If these are missing, stop and tell the user to re-run setup with the "Internal Next.js Business App" preset.

Process

  1. Validate the blueprint JSON.
    • Ensure appName, usersAndRoles, entities, workflows, permissions, filesBlobNeeds, auditEvents, dashboardsViews, and aiAssistPoints exist.
    • Report open questions that block safe generation.
  2. Plan the generation slice.
    • Full app: generate all core entities and views.
    • Feature mode: generate only the requested workflow/entity slice and do not churn unrelated files.
  3. Update Prisma.
    • Add enums for entity statuses and role/action concepts where useful.
    • Add models for blueprint entities.
    • Keep User, FileObject, and AuditLog unless the blueprint explicitly replaces them.
    • Prefer relational foreign keys over denormalized JSON for workflow state.
  4. Generate repository modules under src/lib/<entity>/repository.ts.
    • Keep Prisma calls inside repositories.
    • Return plain domain objects to routes/pages.
    • Add create/update/status-transition helpers matching workflows.
  5. Generate API routes under src/app/api/<entity>/route.ts and focused subroutes when needed.
    • Use auth helpers from src/lib/auth.
    • Validate input with Zod.
    • Create audit events for every workflow transition.
    • Keep blob operations behind src/lib/blob/client.ts.
  6. Generate dashboard UI.
    • Add queue/table/detail/form views from dashboardsViews.
    • Keep operational density appropriate for internal tools.
    • Include file upload controls only where filesBlobNeeds requires them.
  7. Update seed data in prisma/seed.ts.
    • Seed users/roles and a small synthetic sample for each generated workflow.
    • Never use real PII.
  8. Add tests where the app has a test harness.
    • If no harness exists, add a short docs/stories/<feature>/how-to-test.md with manual and typecheck validation.
  9. Update docs.
    • README.md: app-specific quick start and core workflows.
    • docs/setup.md: provider notes only when generation changes env needs.
    • docs/stories/<feature>/: generated story, solution components, how-to-test, manual steps.
  10. Run validation.
  • npm run typecheck
  • npm run lint
  • npm run build when dependencies and env are available.

Ownership Boundaries

The framework may:

  • Read the blueprint.
  • Modify app code in the target repo.
  • Add docs/stories and validation notes.
  • Preserve one app stack while preparing environment guidance for hosting providers.

The framework must not:

  • Fork the app into separate Vercel/Azure/local codebases.
  • Bypass Prisma with ad hoc database calls in routes/pages.
  • Hardcode provider-specific blob logic outside src/lib/blob/client.ts.
  • Generate AI actions that silently change workflow state without a human action.

Output

End with:

  • Files changed, grouped by Prisma, repositories, API, UI, tests, docs.
  • Validation commands run and their result.
  • Any generation gaps that need app-creator template support.

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.