{"id":"df7fcec7-6784-482b-89b3-67a100cbf61d","shortId":"7eJqQD","kind":"skill","title":"speckit-baseline","tagline":"Generate feature specifications by analyzing existing source code.","description":"# Spec Kit Baseline Skill\n\n## When to Use\n\n- You need a spec for existing or legacy code.\n- You want to document a feature before refactoring.\n- You inherited a codebase without written requirements.\n\n## Inputs\n\n- A target path, file list, or glob pattern describing the code to analyze.\n- Repo context with `.specify/` scripts and templates.\n\nIf the target is missing or ambiguous, ask a focused question before continuing.\n\n## Goal\n\nGenerate a technology-agnostic spec for existing code, then create the feature branch/spec file using the standard Spec Kit templates.\n\n## Workflow\n\n1. **Parse target input**: Identify files, directories, or patterns to analyze.\n   - Accept file paths, glob patterns, or directory paths.\n   - If empty: stop and ask for a concrete target.\n\n2. **Discover and read source files**:\n   - Expand globs to a file list.\n   - Read file contents for analysis.\n   - Identify primary language(s) and frameworks.\n   - Map key file relationships and dependencies.\n\n3. **Analyze code structure**:\n   - Identify entry points and public interfaces.\n   - Extract function/method signatures and behaviors.\n   - Find data models and entities.\n   - Detect API endpoints and routes.\n   - Identify user-facing functionality.\n\n4. **Generate a short name** (2-4 words) from the analyzed code:\n   - Use action-noun format (e.g., \"user-auth\", \"payment-processing\").\n   - Base on primary functionality discovered.\n   - Preserve technical terms where meaningful.\n\n5. **Create the feature branch and spec file**:\n   - Find the highest existing feature number for this short name (branches/specs).\n   - Run `.specify/scripts/bash/create-new-feature.sh --json` with the calculated number and short name.\n   - Read BRANCH_NAME, FEATURE_DIR, and SPEC_FILE paths from the script JSON output.\n   - For single quotes in args like \"I'm Groot\", use escape syntax: e.g 'I'\\''m Groot' (or double-quote if possible: \"I'm Groot\").\n\n6. **Load the spec template** from `.specify/templates/spec-template.md`.\n\n7. **Draft the specification** using the template structure:\n   - **User Stories**: Infer from user-facing code paths and interactions.\n   - **Acceptance Scenarios**: Derive from validation logic, error handling, and tests.\n   - **Functional Requirements**: Extract from business rules and constraints.\n   - **Key Entities**: Identify from data models and schemas.\n   - **Success Criteria**: Infer from metrics, logging, or performance-related code.\n   - **Assumptions**: Document inferences made during analysis.\n\n8. **Abstract implementation details**:\n   - Convert technical patterns to user-focused requirements.\n   - Remove framework-specific terminology.\n   - Focus on WHAT the code does, not HOW it does it.\n\n9. **Create spec quality checklist** at `FEATURE_DIR/checklists/requirements.md`.\n\n10. **Report completion** with:\n    - Branch name and spec file path.\n    - Summary of analyzed files.\n    - Key features discovered.\n    - Areas needing clarification or review.\n\n## Outputs\n\n- `specs/<feature>/spec.md`\n- `specs/<feature>/checklists/requirements.md`\n\n## Key rules\n\n- Focus on extracting WHAT and WHY from HOW.\n- Abstract away implementation details in the generated spec.\n- Document assumptions made during code analysis.\n- Flag areas where code behavior is unclear.\n- Preserve discovered business rules and constraints.\n- Use `[NEEDS CLARIFICATION]` for ambiguous code sections (max 3).\n- Generated specs should be validated by someone who knows the feature.\n\n## Examples\n\n**Code Pattern → Spec Requirement**:\n\n- `if (user.role === 'admin')` → \"System MUST restrict action to administrator users\"\n- `password.length >= 8` → \"Passwords MUST be at least 8 characters\"\n- `cache.set(key, value, 3600)` → \"System MUST cache results for improved performance\"\n- `try { ... } catch (e) { notify(e) }` → \"System MUST notify users when errors occur\"\n\n**Code Pattern → User Story**:\n\n- Login endpoint with OAuth → \"As a user, I can sign in using my social account\"\n- Shopping cart logic → \"As a customer, I can add items to my cart for later purchase\"\n- Report generation → \"As an analyst, I can generate reports on system activity\"\n\n## Next Steps\n\nAfter generating spec.md:\n\n- **Clarify** with domain experts using speckit-clarify.\n- **Plan** modernization/refactoring with speckit-plan.\n- **Compare** the generated spec with actual requirements to identify gaps.","tags":["speckit","baseline","agent","skills","dceoy","agent-skills","ai-agents","ai-coding","claude-code","codex-cli","developer-tools","gemini-cli"],"capabilities":["skill","source-dceoy","skill-speckit-baseline","topic-agent-skills","topic-ai-agents","topic-ai-coding","topic-claude-code","topic-codex-cli","topic-developer-tools","topic-gemini-cli","topic-github-copilot","topic-spec-kit","topic-specifications","topic-workflow-automation"],"categories":["speckit-agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/dceoy/speckit-agent-skills/speckit-baseline","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add dceoy/speckit-agent-skills","source_repo":"https://github.com/dceoy/speckit-agent-skills","install_from":"skills.sh"}},"qualityScore":"0.488","qualityRationale":"deterministic score 0.49 from registry signals: · indexed on github topic:agent-skills · 76 github stars · SKILL.md body (4,370 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-02T06:55:43.178Z","embedding":null,"createdAt":"2026-04-18T22:13:41.145Z","updatedAt":"2026-05-02T06:55:43.178Z","lastSeenAt":"2026-05-02T06:55:43.178Z","tsv":"'-4':193 '/checklists/requirements.md':420 '/spec.md':418 '1':100 '10':394 '2':128,192 '3':157,466 '3600':505 '4':187 '5':221 '6':289 '7':296 '8':358,494,500 '9':386 'abstract':359,431 'accept':111,315 'account':543 'action':201,489 'action-noun':200 'activ':571 'actual':596 'add':552 'admin':485 'administr':491 'agnost':82 'ambigu':70,462 'analysi':144,357,444 'analyst':564 'analyz':8,56,110,158,197,406 'api':178 'area':411,446 'arg':268 'ask':71,123 'assumpt':352,440 'auth':207 'away':432 'base':211 'baselin':3,14 'behavior':171,449 'branch':225,251,398 'branch/spec':91 'branches/specs':239 'busi':329,454 'cach':508 'cache.set':502 'calcul':245 'cart':545,556 'catch':514 'charact':501 'checklist':390 'clarif':413,460 'clarifi':577,584 'code':11,27,54,86,159,198,311,351,379,443,448,463,479,525 'codebas':39 'compar':591 'complet':396 'concret':126 'constraint':332,457 'content':142 'context':58 'continu':76 'convert':362 'creat':88,222,387 'criteria':342 'custom':549 'data':173,337 'depend':156 'deriv':317 'describ':52 'detail':361,434 'detect':177 'dir':254 'dir/checklists/requirements.md':393 'directori':106,117 'discov':129,215,410,453 'document':31,353,439 'domain':579 'doubl':282 'double-quot':281 'draft':297 'e':515,517 'e.g':204,276 'empti':120 'endpoint':179,530 'entiti':176,334 'entri':162 'error':321,523 'escap':274 'exampl':478 'exist':9,24,85,232 'expand':134 'expert':580 'extract':167,327,425 'face':185,310 'featur':5,33,90,224,233,253,392,409,477 'file':47,92,105,112,133,138,141,153,228,257,402,407 'find':172,229 'flag':445 'focus':73,368,375,423 'format':203 'framework':150,372 'framework-specif':371 'function':186,214,325 'function/method':168 'gap':600 'generat':4,78,188,437,467,561,567,575,593 'glob':50,114,135 'goal':77 'groot':272,279,288 'handl':322 'highest':231 'identifi':104,145,161,182,335,599 'implement':360,433 'improv':511 'infer':306,343,354 'inherit':37 'input':43,103 'interact':314 'interfac':166 'item':553 'json':242,262 'key':152,333,408,421,503 'kit':13,97 'know':475 'languag':147 'later':558 'least':499 'legaci':26 'like':269 'list':48,139 'load':290 'log':346 'logic':320,546 'login':529 'm':271,278,287 'made':355,441 'map':151 'max':465 'meaning':220 'metric':345 'miss':68 'model':174,338 'modernization/refactoring':586 'must':487,496,507,519 'name':191,238,249,252,399 'need':20,412,459 'next':572 'notifi':516,520 'noun':202 'number':234,246 'oauth':532 'occur':524 'output':263,416 'pars':101 'password':495 'password.length':493 'path':46,113,118,258,312,403 'pattern':51,108,115,364,480,526 'payment':209 'payment-process':208 'perform':349,512 'performance-rel':348 'plan':585,590 'point':163 'possibl':285 'preserv':216,452 'primari':146,213 'process':210 'public':165 'purchas':559 'qualiti':389 'question':74 'quot':266,283 'read':131,140,250 'refactor':35 'relat':350 'relationship':154 'remov':370 'repo':57 'report':395,560,568 'requir':42,326,369,482,597 'restrict':488 'result':509 'review':415 'rout':181 'rule':330,422,455 'run':240 'scenario':316 'schema':340 'script':61,261 'section':464 'shop':544 'short':190,237,248 'sign':538 'signatur':169 'singl':265 'skill':15 'skill-speckit-baseline' 'social':542 'someon':473 'sourc':10,132 'source-dceoy' 'spec':12,22,83,96,227,256,292,388,401,417,419,438,468,481,594 'spec.md':576 'specif':6,299,373 'specifi':60 'specify/scripts/bash/create-new-feature.sh':241 'specify/templates/spec-template.md':295 'speckit':2,583,589 'speckit-baselin':1 'speckit-clarifi':582 'speckit-plan':588 'standard':95 'step':573 'stop':121 'stori':305,528 'structur':160,303 'success':341 'summari':404 'syntax':275 'system':486,506,518,570 'target':45,66,102,127 'technic':217,363 'technolog':81 'technology-agnost':80 'templat':63,98,293,302 'term':218 'terminolog':374 'test':324 'topic-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-claude-code' 'topic-codex-cli' 'topic-developer-tools' 'topic-gemini-cli' 'topic-github-copilot' 'topic-spec-kit' 'topic-specifications' 'topic-workflow-automation' 'tri':513 'unclear':451 'use':18,93,199,273,300,458,540,581 'user':184,206,304,309,367,492,521,527,535 'user-auth':205 'user-fac':183,308 'user-focus':366 'user.role':484 'valid':319,471 'valu':504 'want':29 'without':40 'word':194 'workflow':99 'written':41","prices":[{"id":"4dac3015-3286-4220-9913-8ed7c99d7dc0","listingId":"df7fcec7-6784-482b-89b3-67a100cbf61d","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"dceoy","category":"speckit-agent-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T22:13:41.145Z"}],"sources":[{"listingId":"df7fcec7-6784-482b-89b3-67a100cbf61d","source":"github","sourceId":"dceoy/speckit-agent-skills/speckit-baseline","sourceUrl":"https://github.com/dceoy/speckit-agent-skills/tree/main/skills/speckit-baseline","isPrimary":false,"firstSeenAt":"2026-04-18T22:13:41.145Z","lastSeenAt":"2026-05-02T06:55:43.178Z"}],"details":{"listingId":"df7fcec7-6784-482b-89b3-67a100cbf61d","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"dceoy","slug":"speckit-baseline","github":{"repo":"dceoy/speckit-agent-skills","stars":76,"topics":["agent-skills","ai-agents","ai-coding","claude-code","codex-cli","developer-tools","gemini-cli","github-copilot","spec-kit","specifications","workflow-automation"],"license":"agpl-3.0","html_url":"https://github.com/dceoy/speckit-agent-skills","pushed_at":"2026-03-14T17:14:42Z","description":"Agent skills for Spec Kit","skill_md_sha":"fb73729d2e162463b9f7d41e001bb984dd0033b3","skill_md_path":"skills/speckit-baseline/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/dceoy/speckit-agent-skills/tree/main/skills/speckit-baseline"},"layout":"multi","source":"github","category":"speckit-agent-skills","frontmatter":{"name":"speckit-baseline","description":"Generate feature specifications by analyzing existing source code."},"skills_sh_url":"https://skills.sh/dceoy/speckit-agent-skills/speckit-baseline"},"updatedAt":"2026-05-02T06:55:43.178Z"}}