AI Feature Spec Writer — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited AI Feature Spec Writer (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
A bulleted imperative like {match} tells the agent to never reveal, disclose, or mention something to the user. Used adversarially it can instruct the agent to hide its tool calls or lie about what it did — stripping the transparency a user relies on to trust the agent.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill writes a complete product and engineering spec for an AI-powered feature. Unlike a standard feature spec, AI features require additional sections: model selection rationale, prompt strategy, fallback behavior when the model produces bad output, latency and cost budgets, evaluation criteria, and a plan for handling model updates. The output is a spec detailed enough to guide implementation and evaluation without requiring additional design sessions.
Use this before building any feature that incorporates an LLM, image model, or other AI component — especially when the feature will be customer-facing or when the output quality directly affects the user experience.
Copy this file to .agents/skills/ai-feature-spec-writer/SKILL.md in your project root.
Then ask:
Provide:
Add the instructions below to your .cursorrules or paste them into the Cursor AI pane with the feature description.
Provide the feature description and context. Ask Codex to follow the instructions below to produce the spec.
When asked to write an AI feature spec, produce a document covering all of the following sections:
Write 3–5 user stories in the format: "As a [user type], I want to [action], so that [outcome]."
Include at least one story for the happy path, one for the failure/fallback case (what happens when AI can't produce a good answer), and one for the user who wants to ignore or override the AI.
Define exactly:
This section is mandatory for AI features. Define behavior for each failure scenario:
Define how you will evaluate quality before and after launch:
Input to Agent:
"Use the AI Feature Spec Writer skill. Feature: Add an AI 'summarize this document' button to our document management SaaS. Users upload long PDFs, and reading them is time-consuming. We want to show a 2–3 paragraph summary when they click a button. We use OpenAI. Users are enterprise knowledge workers. Documents can be up to 50 pages."
Output from Agent:
# AI Feature Spec — Document Summary
>
## Feature Overview - Name: One-click Document Summary - Description: Generates a 2–3 paragraph plain-English summary of any uploaded document - Problem: Users spend 10–15 minutes skimming long documents to decide if they're relevant. 62% of uploaded documents are never read in full (per internal analytics). - Target user: Enterprise knowledge workers managing large document libraries - Success metrics: Summary shown-to-read rate > 70%; user satisfaction rating ≥ 4/5; time-to-first-useful-action reduced by 30%
>
## User Stories
>
1. As a knowledge worker, I want to click "Summarize" on any document and see a plain-English summary in under 10 seconds, so that I can quickly decide if the document is worth reading in full. 2. As a user, when the AI summary is poor or wrong, I want to clearly see that it's AI-generated and be able to dismiss it and read the original, so I don't make decisions based on bad information. 3. As a user viewing a 100-page document, I want to know that the summary is based on the full document (or explicitly told which portion was used), so I can trust its completeness.
>
## Input and Output Contract
>
- Input: Extracted text from the uploaded PDF (via existing pdf-parse integration) - Input constraints: Up to 50,000 tokens (approx. 35,000 words / ~100 pages); truncated at 50 pages if longer, with a note to the user - Expected output: 2–3 paragraphs of plain English; 150–300 words total - Output format: Plain text (rendered as markdown in the UI)
>
## Model and Prompt Strategy
>
- Model: GPT-4o-mini — adequate quality for summarization at ~10x lower cost than GPT-4o; 128K context window handles the document length - System prompt: "You are a professional document analyst. Summarize the provided document in 2–3 paragraphs. Be accurate and neutral. Do not add information not present in the document. Identify the document type (report, contract, research, etc.) in the first sentence." - Temperature: 0.3 — lower temperature for factual summarization, reduces hallucination risk - Context management: If document exceeds 50,000 tokens, summarize the first and last 25% plus any section clearly labeled "executive summary" or "conclusion"
>
## Fallback and Error Handling
>
- Low-quality output: Show the summary with a "This summary was AI-generated. Accuracy is not guaranteed." disclaimer. Provide a "Was this helpful? 👍 👎" feedback widget. - OpenAI API unavailable: Hide the Summarize button with a tooltip: "AI summarization is temporarily unavailable." Do not surface an error page. - Latency > 15 seconds: Show a spinner with "Summarizing..." for up to 15s; if exceeded, display "Summary timed out — please try again." - Document too long: Show partial summary with: "This summary covers the first 50 pages. The document has [N] total pages."
>
## Cost Budget
>
- Estimated tokens per summary: ~30,000 input + 300 output ≈ 30,300 tokens - Cost per summary (GPT-4o-mini): ~$0.005 - Estimated usage: 10 summaries/user/month → $0.05/user/month - Cost control: Cache summaries by document hash for 30 days; re-generate only when document is updated
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.