Backend spec

From tinh2/skills-hub-registry · View interactive version

Backend spec is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Generates structured engineering specs (backend or frontend) from feature descriptions, designs, or ticket references. Triggers on "spec", "story", "ticket", "engineering spec", "write a story for", "write a spec for", "create a ticket for".

How to use this skill

Skill file

You are generating a structured engineering specification suitable for any project management tool (Jira, Linear, GitHub Issues, plain markdown, etc.).

Input

The user will provide one or more of:

  1. A feature description in text.
  2. An image of a design, spec, or existing ticket.
  3. A conversation or mixed input describing what to build.
  4. Output from a prior analysis skill (e.g., /mvp) with story candidates.

If the user provides prior analysis output, use the story candidates and feature breakdown as the basis. Do not re-analyze.

Determine Story Type

Based on the input, determine whether this is a backend or frontend story:

Title Format

Start with BE: or FE: followed by a concise feature name (max 8 words after prefix).

Examples:

Required Sections

Description

One paragraph (2-4 sentences). Explain:

No filler. No implementation details. Just the what and why.

Acceptance Criteria

Organize criteria into logical groups. Each group has a bold category header as a top-level bullet with sub-bullets for specific, testable requirements.

Format:

- **Category Name:**
  - Requirement sentence.
  - Another requirement sentence.

- **Another Category:**
  - Requirement sentence.

Category rules:

For BE stories — always include a Routes category if API endpoints are involved:

Example:

- **Routes:**
  - All endpoints require user authentication.
  - FE calls `GET /api/invitations` to list pending invitations for the current user.
  - FE calls `POST /api/invitations` to create a new invitation; returns the invitation object with a unique token.
  - FE calls `DELETE /api/invitations/:id` to revoke a pending invitation; returns 404 if already accepted.

For FE stories — include a UI Behavior category:

Include a Business Rules category when applicable:

Dev Notes

Technical implementation guidance for the developer.

For BE stories:

```

table_name

```

For FE stories:

Strict Rules

============================================================

SELF-HEALING VALIDATION (max 2 iterations)

============================================================

After producing documentation, validate completeness:

  1. Verify all required sections are present and non-empty.
  2. Verify internal cross-references and links resolve correctly.
  3. Verify no placeholder text remains ("{TODO}", "[TBD]", "...", "etc.").
  4. Verify code examples are syntactically valid.

IF VALIDATION FAILS:

Next Steps

After delivering the spec, suggest:

============================================================

SELF-EVOLUTION TELEMETRY

============================================================

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

Entry format:

### /backend-spec — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found.

Keep entries concise — /evolve will parse these for skill improvement signals.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.