Agent skill

Spec Optimizer

by cdavid817 in cdavid817/vanehub-ai

Analyze and safely optimize OpenSpec main specifications. An agent skill from cdavid817/vanehub-ai.

Apache-2.0Auto-check passedAI & LLM Engineering

Install Spec Optimizer

skills CLI
$ npx skills add cdavid817/vanehub-ai --skill spec-optimizer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cdavid817/vanehub-ai spec-optimizer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cdavid817/vanehub-ai.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/spec-optimizer .claude/skills/spec-optimizer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
spec-optimizer
GitHub stars
116
Token cost
~347 tokens
SKILL.md length
146 words
Files
2
Skills in repo
1
Repo updated
First seen
Licence
Apache-2.0

At a glance

Analyze and safely optimize OpenSpec main specifications. An agent skill from cdavid817/vanehub-ai.

  • Works in 7 steps: Parse capability, Requirement, Scenario,… → Report duplicate candidates and… → Flag specs above 500 lines or 8,000… → …
  • Asked to find semantically duplicate Requirements
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Cluster related capabilities

What it does

Spec Optimizer is an agent skill from cdavid817/vanehub-ai. Analyze and safely optimize OpenSpec main specifications. Use when asked to find semantically duplicate Requirements or Scenarios, cluster related capabilities, enforce spec line/token budgets, or generate reviewable consolidation mappings and diffs without changing main specs automatically.

Its SKILL.md is about 350 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in AI & LLM Engineering, covering LLM cost and token optimization. It works with Google Gemini, React, Tauri and TypeScript. The repository describes itself as: AI 编程智能体统一桌面工作台 | Desktop hub for managing Claude Code, Codex CLI, Gemini CLI & OpenCode. Tauri 2 · Rust · React · SQLite. The licence is Apache-2.0.

When your agent uses it

  • Asked to find semantically duplicate Requirements
  • Cluster related capabilities
  • Enforce spec line/token budgets
  • Generate reviewable consolidation mappings and diffs without changing main specs automatically

Example prompts

  • “/spec-optimizer”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Parse capability, Requirement, Scenario, SHALL, and MUST units.
  2. Report duplicate candidates and capability clusters as recommendations, not facts.
  3. Flag specs above 500 lines or 8,000 tokens unless the user supplies different budgets.
  4. For every proposed merge, create a mapping from each source Requirement and Scenario to a retained target or an explicit rejection reason.
  5. Fail the coverage check when any source SHALL or MUST is missing from the mapping.
  6. Write review artifacts in a new OpenSpec change: analysis/report.md, analysis/mapping.md, analysis/coverage.md, analysis/diff.md, and…
  7. Stop before applying changes. Ask the user to review the artifacts and use the normal OpenSpec workflow for approved edits.

What it can do on your machine

Read from SKILL.md and the folder at commit 41ab955. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Spec Optimizer loads about 347 tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 146 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~77
When it runs · the whole SKILL.md, loaded when a task matches
~347

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from cdavid817/vanehub-ai at commit 41ab955, republished under its Apache-2.0 licence (© cdavid817). 146 words, ~347 tokens.

Download SKILL.mdSave it as .claude/skills/spec-optimizer/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
spec-optimizer
description
Analyze and safely optimize OpenSpec main specifications. Use when asked to find semantically duplicate Requirements or Scenarios, cluster related capabilities, enforce spec line/token budgets, or generate reviewable consolidation mappings and diffs without changing main specs automatically.

Spec Optimizer

Analyze openspec/specs/ only. Never edit openspec/specs/ or openspec/changes/archive/ during analysis.

  1. Parse capability, Requirement, Scenario, SHALL, and MUST units.
  2. Report duplicate candidates and capability clusters as recommendations, not facts.
  3. Flag specs above 500 lines or 8,000 tokens unless the user supplies different budgets.
  4. For every proposed merge, create a mapping from each source Requirement and Scenario to a retained target or an explicit rejection reason.
  5. Fail the coverage check when any source SHALL or MUST is missing from the mapping.
  6. Write review artifacts in a new OpenSpec change: analysis/report.md, analysis/mapping.md, analysis/coverage.md, analysis/diff.md, and proposed delta specs.
  7. Stop before applying changes. Ask the user to review the artifacts and use the normal OpenSpec workflow for approved edits.

Use the archive catalog only to locate historical context after a main-spec candidate is identified; do not optimize or rewrite archive artifacts.

© cdavid817, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .codex/skills/spec-optimizer of cdavid817/vanehub-ai.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 41ab955

Compare with similar skills

Spec Optimizer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Spec Optimizer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Spec Optimizer this skillcdavid817/vanehub-ai116—~347Automated safety check: PassApache-2.0
Agentbro PR Mergeshirenchuang/agentbro203—~648Automated safety check: PassApache-2.0
Code Reviewtimwuhaotian/the-pair378—~250Automated safety check: PassMIT
Gemini API Devgoogle-gemini/gemini-skills4.3k—~5.1kAutomated safety check: PassApache-2.0
Cross-Model Benchmarkgarrytan/gstack136k—~4kAutomated safety check: NotesMIT
Hyper Jevdisler/ten-levels-of-jev207—~1.7kAutomated safety check: PassMIT

Similar skills

  • Agentbro PR Merge

    shirenchuang/agentbro

    A skill your agent uses when reviewing, fixing CI for, approving workflows for, or merging AgentBro pull requests into dev/main, especially external contributor PRs where contributor attribution…

    203 GitHub stars~648 tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Code Review

    timwuhaotian/the-pair

    Comprehensive code review with security and performance checks

    378 GitHub stars~250 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Gemini API Dev

    google-gemini/gemini-skills

    Official

    A skill your agent uses when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, speech generation (TTS), voice…

    4.3k GitHub stars~5.1k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Cross-Model Benchmark

    garrytan/gstack

    Sends one prompt to Claude, GPT through the Codex CLI and Gemini, then tabulates response time, token use and cost, with an optional judged quality score.

    136k GitHub stars~4k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Hyper Jev

    disler/ten-levels-of-jev

    Integrate and use Jev, TypeSafe AI's System One decision model, in production codebases.

    207 GitHub stars~1.7k tokensUpdated 10 days ago
    AI & LLM EngineeringAuto-check passed
  • Antigravity

    yuting0624/antigravity-for-claude-code

    Run the Antigravity CLI (Gemini) as a collaborating AI inside Claude Code, with intelligent model routing across the software development lifecycle.

    376 GitHub stars~9.1k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed

Questions about Spec Optimizer

What does Spec Optimizer do?

Analyze and safely optimize OpenSpec main specifications. An agent skill from cdavid817/vanehub-ai. Spec Optimizer is an agent skill from cdavid817/vanehub-ai. Analyze and safely optimize OpenSpec main specifications.

When should I use Spec Optimizer?

Spec Optimizer fits situations like: asked to find semantically duplicate Requirements; cluster related capabilities; enforce spec line/token budgets; generate reviewable consolidation mappings and diffs without changing main specs automatically.

How do I install Spec Optimizer in Claude Code?

Run `npx skills add cdavid817/vanehub-ai --skill spec-optimizer -a claude-code`. Or copy the skill folder (.codex/skills/spec-optimizer in cdavid817/vanehub-ai) into .claude/skills/spec-optimizer in your project. Claude Code loads it when a task matches its description.

How do I install Spec Optimizer in Codex?

Run `npx skills add cdavid817/vanehub-ai --skill spec-optimizer -a codex`. Or copy the skill folder (.codex/skills/spec-optimizer in cdavid817/vanehub-ai) into .agents/skills/spec-optimizer in your project. Codex loads it when a task matches its description.

Can I use Spec Optimizer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cdavid817/vanehub-ai --skill spec-optimizer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/spec-optimizer, .gemini/skills/spec-optimizer, .github/skills/spec-optimizer and .opencode/skills/spec-optimizer in your project.

What does Spec Optimizer need to run?

SKILL.md names no scripts, command-line tools or credentials: Spec Optimizer is instructions for the agent only.

Does Spec Optimizer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Spec Optimizer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Spec Optimizer use?

Spec Optimizer is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Spec Optimizer use?

About 347 tokens (SKILL.md is roughly 1.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Spec Optimizer?

Skills that share tags, products or a category with Spec Optimizer: Agentbro PR Merge (shirenchuang/agentbro, 203 stars), Code Review (timwuhaotian/the-pair, 378 stars), Gemini API Dev (google-gemini/gemini-skills, 4.3k stars) and Cross-Model Benchmark (garrytan/gstack, 136k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Spec Optimizer?

cdavid817 (a GitHub user) maintains it in cdavid817/vanehub-ai, which has 116 GitHub stars. The repository was last updated on October 6, 2026.

Source: cdavid817/vanehub-ai on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.