Constraint: Only use this skill when the user explicitly mentions "Stitch".
Contract ownership
This skill maintains the components, tokens, and state contracts of the target framework, and is used to generate constraint inputs before design; it does not generate business page code. Product specifications and the final prompt patterns are uniformly maintained by stitch-design-spec . The prefix/selector assembly hints below are framework examples and must be compiled by the unified entry point in combination with the current page and the inline/applied-system/targeted-edit modes, and must not directly override the applied system or the scope of local modifications.
Use by name stitch-design-spec; installation instructions:npx skills add full-stack-skills/stitch-skills --skill stitch-design-spec, no automatic installation. Real code conversion uses the corresponding components skill, and framework-style design mockups cannot replace code verification.
Purpose
This skill makes the Bootstrap design spec executable in two modes:
- Prefix mode: output a paste-ready Hard constraints prefix for Stitch
[Context]. - Selector mode: output
CONTRACT_SELECTION_JSON_V1and then an assembled Stitch prompt that injects only the required component/state snippets.
Trigger Keywords
Prefer this skill when the user request includes any of:
bootstrap,bootstrap-vue,bs-vue,bs5
Chinese trigger keywords (only for triggering):
bootstrap 风格响应式布局(if context implies Bootstrap)
Source of Truth
references/contract.mdreferences/examples.mdreferences/official.md
Output (STRICT)
Decide the mode by the user intent:
- If the user asks for beautify/polish/refine an existing screen, or asks for selector / JSON / contracts.include / states.include → use Selector mode.
- Otherwise → use Prefix mode.
Prefix mode
Return exactly one code block:
[Hard constraints prefix]
- Framework: BootstrapVue (Vue 3 compatible / Bootstrap 5).
- Design Tokens:
- Colors: Primary=#0d6efd, Secondary=#6c757d, Success=#198754, Danger=#dc3545, Warning=#ffc107, Info=#0dcaf0.
- Spacing: STRICTLY use utility classes (m-*, p-*, gap-*). Scale: 1=0.25rem, 2=0.5rem, 3=1rem (default), 4=1.5rem, 5=3rem.
- Radius: rounded (0.25rem), rounded-pill, rounded-circle.
- Shadows: shadow-sm, shadow, shadow-lg.
- Component Contracts:
- Layout: Use <b-container>, <b-row>, <b-col cols="..." md="...">. NO raw CSS grid.
- Buttons: Use <b-button variant="primary" size="sm/lg">. NO <button class="btn">.
- Forms: Use <b-form-group>, <b-form-input>, <b-form-select>.
- Cards: Use <b-card title="..." img-src="...">.
- Tables: Use <b-table striped hover :items="...">.
- Layout Invariants:
- Mobile-first responsive classes (e.g., col-12 col-md-6).
- Use d-flex utilities for alignment.
Selector mode
Return exactly two code blocks, in this order, with no extra prose:
- Contract selection JSON:
{
"version": "CONTRACT_SELECTION_JSON_V1",
"designSystem": "bootstrap-vue",
"mode": "selector",
"contracts": { "include": [] },
"states": { "include": [] }
}
- Final Stitch prompt:
[Context]
(Paste Hard Constraints Prefix here)
(Add "Layout Invariants" from contract.md if beautifying)
[Layout]
(Describe the macro layout structure, e.g., "Responsive Grid System with Container")
[Components]
(Inject component snippets matching the JSON selection above)
References
When to use
Load this skill when the user needs to select and execute a verifiable, recoverable professional workflow for the current request . First extract the goal, inputs, constraints, delivery format, and acceptance criteria from the request; the description summary is: Bootstrap-Vue design spec for Stitch. Outputs hard-constraints prefix or selector JSON and assembled prompt.
Rules
- Read before write: first confirm the current state and real capabilities, then execute actions that change external state.
- Least privilege: use only the files, tools, accounts, and network scope required to complete the current step.
- Evidence first: when run results, resource IDs, versions, hashes, or test outputs are missing, clearly mark them as
NOT_VERIFIED。 - Idempotency first: retain request identifiers and phase state; when results are unclear, query first and do not blindly retry.
- Privacy and security: logs, examples, receipts, and error messages must not contain tokens, cookies, keys, or personally sensitive data.
Workflow
Step 1: Clarify intent
Confirm whether this skill matches the goal; if it is only an adjacent need, hand it off to a more precise skill.
Step 2: Run prechecks
Confirm the goal, inputs, constraints, available tools, success criteria, and failure boundaries; if any key condition is unknown, stop at the read-only stage.
Step 3: Form a plan
List the tools to be called, the objects that will change, the success criteria, and the safe exit method after failure.
Step 4: Execute actions
Execute in minimal sufficient steps, and record evidence at key state changes; each external call retains an associable state or receipt.
Step 5: Verify delivery
Output the results, verification evidence, incomplete items, risks, and clear next steps, and state facts, inferences, and unverified items separately.
Validation checklist
- The skill trigger conditions are consistent with the user's intent, and adjacent tasks were not misrouted to this skill.
- The inputs, target objects, versions, and output locations are all clear, and no guesses were used to replace required values.
- All write, paid, publishing, or irreversible actions are within the scope of user authorization.
- The results have been verified with independent checks; "command succeeded" or "file exists" alone does not count as complete acceptance.
- The output includes actual evidence, failed/skipped items, remaining risks, and executable next steps.
Gotchas
- Treating the plan as the result: a document or prompt is not the same as real execution; the actual execution level must be indicated.
- Retrying on error: a timeout or lost response may already have produced remote state; query first before deciding whether to retry.
- Implicit scope expansion: batch, full-scale, publishing, overwriting, and paid operations are not natural extensions of ordinary reads and writes.
- Version drift: When citing external resources, record the version, tag, or commit; do not treat a mutable branch as release evidence.
- Stale evidence: Caches, old screenshots, and historical tests cannot prove the current environment; refresh key evidence before delivery.
Non-applicability and boundaries
Do not exceed the scope given by the user; writing, payment, publishing, and irreversible actions require explicit authorization. If the request requires another skill, do not copy its body text; hand off by skill name and preserve the current task context.
Progressive disclosure
- When you need to determine inputs/outputs, states, and authorization points, read
references/workflow-contract.md。 - When you need a pre-delivery self-check, read
references/validation-checklist.md。 - When encountering timeouts, partial success, or recovery scenarios, read
references/error-recovery.md。 - For first runs, denial of overreach, and failure recovery, refer to
examples/happy-path.md、examples/boundary-refusal.md、examples/failure-recovery.md。