ps-init

ps-init is a command for Claude Code from qqabcv520/my-claude-marketplaces. It costs 19 tokens per session (9,112 once invoked), scanned A, original, MIT.

A project-documentation setup command that creates CLAUDE.md and a docs folder based on the detected project type and technology stack.

In plain words
What is it for?
It scans project files, recommends documents such as architecture and testing guides, asks what to create, and generates the selected files.
Why use it?
It turns an unfamiliar codebase into a documented starting point without automatically replacing existing documentation.

Command for Claude Code

Written for Claude Code: Claude Code plugin machinery. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool.

Part of the project-spec plugin — 1 skill, 3 commands, 1 agent shipped together

Good fit It scans project files, recommends documents such as architecture and testing guides, asks what to create, and generates the selected files.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/qqabcv520/my-claude-marketplaces/ps-init
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/qqabcv520/my-claude-marketplaces

Made for: Claude Code.

Or install project-spec, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ps-init

README.md
[![agentmods](https://agentmods.dev/badge/commands/qqabcv520/my-claude-marketplaces/ps-init/github.svg)](https://agentmods.dev/commands/qqabcv520/my-claude-marketplaces/ps-init)
Your own site
<a href="https://agentmods.dev/commands/qqabcv520/my-claude-marketplaces/ps-init"><img src="https://agentmods.dev/badge/commands/qqabcv520/my-claude-marketplaces/ps-init/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ps-init

Your own site · 80×15
<a href="https://agentmods.dev/commands/qqabcv520/my-claude-marketplaces/ps-init"><img src="https://agentmods.dev/badge/commands/qqabcv520/my-claude-marketplaces/ps-init.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 9,112 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00019 $0.09112
Opus 5 $0.00010 $0.04556
Sonnet 5 $0.00004 $0.01822
Haiku 4.5 $0.00002 $0.00911

Measured 11d ago against content hash 84316199d796, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

ps-init scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/project-spec/commands/ps-init.md · 986 lines

How it starts

The opening of the file, as written. The whole thing — 986 lines — stays where its author put it; the contents beside it link to each section on GitHub.

项目文档初始化命令

此命令用于快速初始化项目的文档结构,自动生成 CLAUDE.md 和 docs/ 目录下的各类文档。

使用方法

/ps-init

功能特性

  • 智能项目识别:自动识别项目类型(前端/后端/Python/数据分析/Claude插件等)
  • 动态文档生成:根据项目类型推荐合适的文档清单
  • 文档分层设计:CLAUDE.md 只包含高频使用内容,详细文档放到 docs/
  • 增量更新支持:检测已存在文件,避免覆盖用户内容
  • 复杂模块检测:识别需要专门文档的复杂模块

执行流程

当你运行此命令时,将执行以下步骤:

1. 项目分析

  • 扫描项目配置文件(package.json、requirements.txt 等)
  • 分析项目目录结构
  • 识别项目类型和技术栈
  • 检测复杂模块

2. 文档推荐

根据项目类型推荐文档清单:

前端项目:ARCHITECTURE.md, TESTING.md, DEVELOPMENT.md, TECH_STACK.md, COMPONENTS.md, THEME.md

Node.js 后端:ARCHITECTURE.md, API.md, DATABASE.md, TESTING.md, DEVELOPMENT.md, TECH_STACK.md, DEPLOYMENT.md

Python 后端:ARCHITECTURE.md, API.md, DATABASE.md, TESTING.md, DEVELOPMENT.md, DEPLOYMENT.md

Web3 项目:ARCHITECTURE.md, WALLET_AUTH_IMPLEMENTATION.md, TESTING.md, DEVELOPMENT.md, TECH_STACK.md

数据分析:DATA_SOURCES.md, ANALYSIS_WORKFLOW.md, MODELS.md, TESTING.md

Claude 插件:PLUGIN_STRUCTURE.md, COMMANDS.md, SKILLS.md, HOOKS.md, TESTING.md

通用项目:ARCHITECTURE.md, TESTING.md, DEVELOPMENT.md

3. 交互确认

  • 展示识别结果
  • 询问用户选择需要的文档
  • 确认复杂模块是否需要专门文档

4. 文档生成

  • 生成精简的 CLAUDE.md(<500行)
  • 生成选定的 docs/ 文档
  • 检测文件冲突,询问处理方式

5. 后续指导

  • 显示生成的文档清单
  • 提供后续建议

生成的文档结构

项目根目录/
├── CLAUDE.md              # 精简版项目文档
└── docs/
    ├── ARCHITECTURE.md    # 架构设计(按需)
    ├── TESTING.md         # 测试规范(按需)
    ├── API.md             # API 文档(按需)
    ├── CONTRIBUTING.md    # 贡献指南(按需)
    └── ...                # 其他文档(按需)

CLAUDE.md 内容

生成的 CLAUDE.md 包含:

  • 项目概述(1-2句话)
  • 技术栈
  • 项目结构(简略)
  • 常用命令
  • 编码规范(核心规则)
  • 📚 详细文档索引(Reference 机制)

Reference 机制

CLAUDE.md 中会包含详细文档索引,引导 AI 在需要时读取对应文档:

## 📚 详细文档索引

当需要了解以下内容时,请阅读对应文档:

- **架构设计和技术选型** → 请阅读 `docs/ARCHITECTURE.md`
- **测试策略和测试用例编写** → 请阅读 `docs/TESTING.md`
- **API 接口定义和使用** → 请阅读 `docs/API.md`

⚠️ **重要**:在开始实现功能前,如果涉及以上领域,请先使用 Read 工具阅读相关文档。

增量更新

如果检测到文件已存在,会询问处理方式:

  • 覆盖:用新内容替换现有文件
  • 跳过:保留现有文件,不生成新文件
  • 合并:尝试合并内容(仅限部分文件)

注意事项

  • 生成的文档是模板,需要根据项目实际情况补充完善
  • CLAUDE.md 应保持精简,避免占用过多上下文
  • 详细内容应放到 docs/ 目录,通过 Reference 机制引用
  • 建议定期使用 doc-sync skill 检查文档是否需要更新

Read the full file on GitHub · 986 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 986 lines · 19 tokens per session scan A 84316199d796

Subscribe to this mod's changes

ps-init is a command published in the GitHub repository qqabcv520/my-claude-marketplaces (2 stars, last pushed 5mo ago), licensed MIT. It adds 19 tokens to every session and 9,112 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.