CLAUDE.md 및 Cursor rules와 같은 AI 코딩 에이전트용 파일을 감사하고 생성하여, 토큰 낭비를 줄이고 전체 프로젝트 빌드 사양을 작성합니다.
다른 이름 THE-KIPDEV/specpack
- 스타
- 0
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- 0.1.0
- 마지막 커밋
- 2026년 9월 18일
- 라이선스
- MIT
specpack MCP란?
specpack은(는) MCP server입니다. CLAUDE.md 및 Cursor rules와 같은 AI 코딩 에이전트용 파일을 감사하고 생성하여, 토큰 낭비를 줄이고 전체 프로젝트 빌드 사양을 작성합니다.
프로젝트 README에서 생성된 요약
specpack MCP server 정보
Specpack은 CLAUDE.md, AGENTS.md, .cursorrules와 같이 AI 코딩 에이전트가 사용하는 지침 파일을 최적화하도록 돕습니다. 이 도구는 에이전트 성능에 도움을 주지 않으면서 메모리만 차지하는 역할극 서문, 일반적인 조언, 반복적인 매니페스트 데이터와 같은 중복 정보를 식별하여 토큰 낭비를 줄이는 데 집중합니다. 기존 파일을 감사하여 bloat 점수를 제공하고, 삭제하거나 별도의 문서 파일로 분리할 구체적인 라인을 제안할 수 있습니다.
사용자는 package.json, tsconfig.json 또는 pyproject.toml과 같은 프로젝트 매니페스트를 스캔하여 새롭고 간결한 에이전트 파일을 초기화할 수 있습니다. 새 프로젝트의 경우, spec 명령을 통해 프로젝트 설명을 바탕으로 전체 빌드 사양과 그에 해당하는 에이전트 파일을 생성합니다. 이 서버는 npx를 통해 로컬에서 실행하거나 Claude Code, Cursor, Windsurf와 같은 MCP 클라이언트에 연결할 수 있습니다. 개인정보 보호를 위해 감사 및 초기화 작업은 오프라인으로 수행되지만, 전체 사양을 생성하려면 prompt-generator-website.com 서비스의 API key가 필요하며, 해당 서비스는 초기 초안 작성을 위한 제한적인 무료 티어를 제공합니다.
활용 사례
- 1에이전트 파일의 bloat 감사CLAUDE.md 파일을 분석하여 AI 세션 중 토큰을 낭비하는 중복 라인을 찾습니다.
- 2간결한 프로젝트 지침 초기화package.json 또는 Docker Compose와 같은 기존 프로젝트 설정 파일을 기반으로 최소한의 AGENTS.md 파일을 생성합니다.
- 3전체 빌드 사양 생성단순한 프로젝트 설명을 데이터베이스 스키마 및 에이전트 규칙을 포함한 포괄적인 기술 사양으로 변환합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
specpack MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 specpack MCP 설치
$ claude mcp add --env 'SPECPACK_API_KEY=<YOUR_SPECPACK_API_KEY>' specpack -- npx -y specpackCursor에 specpack MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"specpack": {
"command": "npx",
"args": [
"-y",
"specpack"
],
"env": {
"SPECPACK_API_KEY": "<YOUR_SPECPACK_API_KEY>"
}
}
}
}VS Code에 specpack MCP 설치
.vscode/mcp.json
{
"servers": {
"specpack": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"specpack"
],
"env": {
"SPECPACK_API_KEY": "<YOUR_SPECPACK_API_KEY>"
}
}
}
}VS Code CLI에 specpack MCP 설치
$ code --add-mcp '{"name":"specpack","type":"stdio","command":"npx","args":["-y","specpack"],"env":{"SPECPACK_API_KEY":"<YOUR_SPECPACK_API_KEY>"}}'Claude Desktop에 specpack MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"specpack": {
"command": "npx",
"args": [
"-y",
"specpack"
],
"env": {
"SPECPACK_API_KEY": "<YOUR_SPECPACK_API_KEY>"
}
}
}
}Codex에 specpack MCP 설치
$ codex mcp add specpack --env 'SPECPACK_API_KEY=<YOUR_SPECPACK_API_KEY>' -- npx -y specpackCodex config.toml에 specpack MCP 설치
~/.codex/config.toml
[mcp_servers.specpack] command = "npx" args = ["-y", "specpack"] [mcp_servers.specpack.env] SPECPACK_API_KEY = "<YOUR_SPECPACK_API_KEY>"
Gemini CLI에 specpack MCP 설치
$ gemini mcp add -s user -e 'SPECPACK_API_KEY=<YOUR_SPECPACK_API_KEY>' specpack npx -- -y specpackGemini settings.json에 specpack MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"specpack": {
"command": "npx",
"args": [
"-y",
"specpack"
],
"env": {
"SPECPACK_API_KEY": "<YOUR_SPECPACK_API_KEY>"
}
}
}
}구성
SPECPACK_API_KEY비밀Optional prompt-generator-website.com API key (pgw_…): more specs and AI drafts than the free quota.
| 이름 | 설명 | 유형 |
|---|---|---|
| SPECPACK_API_KEY | Optional prompt-generator-website.com API key (pgw_…): more specs and AI drafts than the free quota. | 비밀 |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능the-kipdev/specpack is public and reachablegithub.com/the-kipdev/specpack ↗통과
- 패키지가 이 저장소를 소스로 명시specpack names the-kipdev/specpack as sourcenpmjs.com/package/specpack ↗통과
- 빌드 출처(Sigstore 증명)No build attestation published for this release검사되지 않음
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-09-18github.com/the-kipdev/specpack ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from specpack통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음99 resolved dependencies checked; no critical advisoryosv.dev ↗통과
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답initialize answered with protocol 2025-06-18 in 942 ms통과
README
GitHub에서 보기specpack
Lint and generate the files your AI coding agent reads — CLAUDE.md, AGENTS.md, .cursorrules,
Cursor rules — and turn a project description into a full build spec. CLI, library and MCP server.
npx specpack audit # bloat score for the agent files in this repo (offline)
npx specpack init # write a lean AGENTS.md from your manifests (offline)
npx specpack spec --describe "Booking app for dog groomers with deposits and SMS reminders"
CLAUDE.md / AGENTS.md are loaded into the agent's context on every session. Every line that
restates package.json, pastes a file tree or tells the model to "write clean code" costs tokens and
competes with the two rules that actually matter. specpack audit finds those lines; specpack init
starts you at the trimmed end.
Node ≥ 18. No account needed. audit and init never touch the network.
specpack audit — how much of your memory file does nothing?
Each line is classified keep, cut (removing it changes nothing: role-play preamble, generic
advice, restated manifests, duplicates, emphasis inflation, prose) or offload (true but
situational: file trees, schema dumps, endpoint lists, long code blocks, setup/deploy sections — move
them to their own file and reference them with @docs/…). Same rules as the browser tool at
prompt-generator-website.com/claude-md-audit.
Real output on a typical file:
$ npx specpack audit CLAUDE.md
CLAUDE.md 59% bloat · 44 lines · ~341 tokens every session
10 keep · 12 cut · 15 offload of 37 non-empty lines · ceiling 200, trimmed files land near 60
Over half of this file is doing nothing. It is not neutral weight — it is what your real rules are competing against.
3 cut You are an expert senior full-stack developer with 10 years of experience.
↳ role-play preamble: CLAUDE.md is project memory, not a system prompt. "You are an expert…" costs tokens and changes nothing about the code produced.
4 cut Please always write clean, readable and maintainable code.
↳ default behaviour: Removing this line does not make the model write worse code — it already tries to do this. It only dilutes the lines that matter.
5 cut IMPORTANT: follow best practices at all times.
…
12 cut - Next.js 15.1
↳ restates a manifest: package.json / composer.json / requirements.txt already state this, and the agent reads them. Keep it only if the version pin has a non-obvious reason.
…
18 offload ## Database schema
↳ situational section: Only a fraction of your sessions need this. Move the section to its own file and point at it with @docs/… so it loads when the task asks for it.
…
31 offload src/
↳ file tree: Root of a pasted directory tree. The agent can run ls and get the real one — a copy goes stale after the first refactor.
…
Trimmed copy (8 lines): specpack audit CLAUDE.md --trimmed
Without arguments it audits every agent file in the current directory: CLAUDE.md, AGENTS.md,
.cursorrules, .windsurfrules, .github/copilot-instructions.md, CLAUDE.local.md,
.cursor/rules/*.mdc. - reads stdin.
| Option | |
|---|---|
--trimmed |
print only the keep-only version (> CLAUDE.trimmed.md) |
--json |
every line with verdict, rule and reason, plus stats and the trimmed file |
--all |
also list the kept lines and why |
--max-bloat <pct> |
exit code 1 when a file is above the threshold |
In CI
# .github/workflows/agent-files.yml
name: Agent files
on: [pull_request]
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npx -y specpack audit --max-bloat 30
specpack init — a lean AGENTS.md from what the repo already says
Reads package.json (scripts, lockfile → package manager, framework), tsconfig.json, the Prisma
schema, pyproject.toml / requirements*.txt (uv, Poetry), composer.json, go.mod, Cargo.toml,
Gemfile, Makefile, Docker Compose, .nvmrc, .env.example, .claude/commands. Only what a file
states is written: nothing is guessed, no patch versions, no "You are an expert" preamble. Sections with
nothing detected are left out.
Real output on a Next.js + Prisma repository:
$ npx specpack init
✓ Wrote AGENTS.md (37 lines, 0% bloat)
Scanned from package.json, tsconfig.json, prisma/schema.prisma, .nvmrc, docker-compose.yml, .env.example, .gitignore, .claude/commands/.
# AGENTS.md — ledgerly
Invoicing app for freelancers. A web application.
## Stack
- Next.js (App Router)
- Tailwind CSS
- Zod
- Stripe
- Vitest
- Playwright
- ESLint
- TypeScript (strict)
- Prisma + PostgreSQL (schema: prisma/schema.prisma)
- Local services via Docker Compose (docker-compose.yml): db
## Commands
- `pnpm dev` — `next dev --turbopack -p 3001` (port 3001)
- `pnpm build` — `next build`
- `pnpm start` — `next start`
- `pnpm test` — `vitest run`
- `pnpm test:e2e` — `playwright test`
- `pnpm lint` — `next lint`
- `pnpm db:migrate` — `prisma migrate dev`
- `pnpm db:seed` — `tsx prisma/seed.ts`
- `docker compose up -d`
## Project rules
These are things the agent cannot guess from the code. Follow them exactly.
- Use pnpm (pnpm-lock.yaml), not npm or yarn — another package manager ignores the lockfile.
- Runtime: Node 20 (.nvmrc).
- Environment variables are listed in `.env.example`; the real `.env` is git-ignored — do not commit it.
<!-- Add the rules the code cannot tell the agent, one per line: the directory scheduled for deletion,
money stored in cents, the command that must never run against staging. -->
Then add the rules only you know under Project rules — that is the part that matters.
| Option | |
|---|---|
--format agents |
AGENTS.md (default) |
--format claude |
CLAUDE.md — imports @AGENTS.md when it exists, plus Claude Code specifics (slash commands, .mcp.json servers) |
--format cursor |
.cursor/rules/project.mdc (always-applied rule) |
--format all |
the three |
--dry-run / --force |
preview / overwrite (existing files are never overwritten otherwise) |
specpack spec — a full build spec for a new project
For a project that does not exist yet, prompt-generator-website.com
turns a questionnaire (7 project types: SaaS, e-commerce, business site, marketplace, blog, web app,
landing page) into a complete specification — stack, database schema, authentication, type-specific
features, pages, design, SEO, security, legal, deployment, file structure — plus AGENTS.md,
CLAUDE.md, .cursor/rules/project.mdc, .cursorrules, .windsurfrules and
.github/copilot-instructions.md that keep the agent on-spec for the whole build.
# AI drafts the answers from a description (10–40 s), then the spec is generated
npx specpack spec --describe "Booking app for dog groomers with deposits and SMS reminders" --out ./groombook
# your own answers (see GET /questions in the API)
npx specpack spec --answers answers.json --type saas
# or answer the questionnaire in the terminal
npx specpack spec
The spec engine is deterministic: the same answers always give the same bytes. Free without an
account: 2 specs and 3 AI drafts. More: a 7-day Pass or Pro at
prompt-generator-website.com/pricing; then
specpack login pgw_… (or SPECPACK_API_KEY). specpack whoami shows what is left.
MCP server
Seven tools for Claude Code, Cursor, Windsurf, VS Code and any MCP client:
| Tool | Where it runs | |
|---|---|---|
audit_agent_file |
local | bloat score, lines to cut/offload with reasons, trimmed copy |
draft_agent_file |
local | lean AGENTS.md / CLAUDE.md / Cursor rule from the manifests (returns it, writes nothing) |
list_project_types |
API | the 7 project types |
get_questionnaire |
API | every question for a type; the agent fills it from the conversation and the repo |
generate_spec |
API | spec + agent files, written to output_dir if given (files picks which). No AI on the server |
draft_answers |
API | AI fills the questionnaire from a description (uses an AI draft) |
get_usage |
API | plan and what is left |
Claude Code
claude mcp add specpack -- npx -y specpack mcp
Cursor (.cursor/mcp.json), Windsurf, Claude Desktop
{
"mcpServers": {
"specpack": { "command": "npx", "args": ["-y", "specpack", "mcp"], "env": { "SPECPACK_API_KEY": "" } }
}
}
Remote, nothing to install (streamable HTTP; audit_agent_file and draft_agent_file read local files, so they only exist in the local server):
https://prompt-generator-website.com/mcp — optional header Authorization: Bearer pgw_….
claude mcp add --transport http specpack https://prompt-generator-website.com/mcp
Library
import { audit, scanProject, renderAgentsMd, SpecpackClient } from "specpack";
const { stats, lines, trimmed } = audit(fs.readFileSync("CLAUDE.md", "utf8"));
console.log(`${stats.bloat}% bloat`, lines.filter((l) => l.verdict === "cut").length, "lines to cut");
const agentsMd = renderAgentsMd(scanProject("."));
const client = new SpecpackClient({ apiKey: process.env.SPECPACK_API_KEY });
const draft = await client.draft("A booking app for dog groomers");
const spec = await client.createSpec(draft.type, draft.answers); // spec.spec, spec.files["AGENTS.md"]…
createMcpServer() is exported from specpack/mcp. API errors are SpecpackError with code
(quota_exceeded, unauthorized, invalid_request, …), status and upgradeUrl.
Reference
- Exit codes:
0ok ·1failure, or--max-bloatexceeded ·2usage error or quota exceeded. - Environment:
SPECPACK_API_KEY,SPECPACK_API_URL(testing),NO_COLOR. - Key storage:
~/.config/specpack/config.json($XDG_CONFIG_HOMEhonoured), mode 600. - HTTP API: API-V1.md.
- Privacy:
auditandinitread local files and send nothing.specsends your answers or description to prompt-generator-website.com.
License
MIT © Kipdev
specpack MCP 질문
specpack MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add --env 'SPECPACK_API_KEY=<YOUR_SPECPACK_API_KEY>' specpack -- npx -y specpack를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
specpack MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
파일을 감사할 때 인터넷 연결이 필요한가요?
아니요, audit 및 init 명령은 오프라인으로 작동하며 네트워크를 사용하지 않습니다.
specpack은 어떤 종류의 파일을 감사할 수 있나요?
CLAUDE.md, AGENTS.md, .cursorrules, .windsurfrules, GitHub Copilot 지침을 포함한 다양한 에이전트 파일을 감사할 수 있습니다.
specpack이 토큰 사용량을 어떻게 최적화하나요?
에이전트 성능에 기여하지 않으면서 토큰만 소비하는 역할극 서문이나 중복된 매니페스트 데이터와 같은 'bloat(낭비)' 라인을 식별합니다.