loom-init-project

loom-init-project is a skill for Claude Code from xiqin/loom. It costs 48 tokens per session (2,105 once invoked), scanned A, original, MIT.

A project setup tool for creating .loom context files, which store project rules, memory, workflows, and instructions for coding agents.

In plain words
What is it for?
Use it to initialize a repository, choose project roles and agent tools, create entry documents, and prepare development workflow configuration.
Why use it?
It gives agents a shared starting point instead of leaving project guidance scattered across several files.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions CLAUDE.md; mentions subagents; mentions Claude Code.

Part of the loom-engineering plugin — 22 skills shipped together

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.

agentmods
npx agentmods add skills/xiqin/loom/loom-init-project
Any agent
npx skills add xiqin/loom --skill loom-init-project
Clone the repo
git clone --depth 1 https://github.com/xiqin/loom

Made for: Claude Code.

Or install loom-engineering, the plugin that ships this one along with the rest of its 22 skills.

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 loom-init-project

README.md
[![agentmods](https://agentmods.dev/badge/skills/xiqin/loom/loom-init-project.svg)](https://agentmods.dev/skills/xiqin/loom/loom-init-project)
Your own site
<a href="https://agentmods.dev/skills/xiqin/loom/loom-init-project"><img src="https://agentmods.dev/badge/skills/xiqin/loom/loom-init-project.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,105 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00048 $0.02105
Opus 5 $0.00024 $0.01052
Sonnet 5 $0.00010 $0.00421
Haiku 4.5 $0.00005 $0.00211

Measured 6d ago against content hash 9f5472b41da8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

loom-init-project 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 6d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/init-project.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/loom-init-project/SKILL.md · 143 lines

How it starts

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

项目初始化 Skill

  • .loom/ 是唯一长期维护点,存放项目原则、结构化记忆和 workflow。
  • AGENTS.md 是 Codex/OpenCode 等通用 agent 的标准入口。
  • Claude、Cursor、Copilot 只接收薄 wrapper 或规则副本,避免多处规则漂移。
  • 初始化尽量自动化;不确定的信息用 [TODO] 标记,交给用户确认。

触发条件

用户只需要说 /loom-init-project初始化项目扫描项目生成配置

内部执行方式

触发本 skill 后,判断当前目录是不是项目根目录,如果不是根目录,询问用户是否在当前目录运行:

第一步:确认角色(多选)

如果用户没有明确指定角色,先询问这个项目给谁用(可多选,取并集):

  • pm:PM 视角,生成产品上下文 .loom/rules/product.md,走 需求 → spec → 原型 流水线
  • dev:研发视角,生成工程上下文(宪章 / subagent-context),走完整工程流水线

角色决定生成哪些 .loom/ 文件;workflow.yaml 始终是含全部 pipeline 的单文件,不裁剪。未指定时默认 dev(与历史行为一致)。把选择通过 --roles 传给脚本,例如 --roles pm,dev

第二步:确认 agent 工具

如果用户没有明确指定 agent 工具,再询问要为哪些工具生成入口文件。可选项为:

  • claude-code:生成 AGENTS.md+ CLAUDE.md
  • codex:生成 AGENTS.md
  • opencode:生成 AGENTS.md 并合并 opencode.json watcher ignore
  • cursor:生成 .cursor/rules/loom.mdc
  • copilot:生成 .github/copilot-instructions.md

拿到用户选择后,把角色和工具通过 --roles / --tools 显式传给脚本,例如:

node <skill-dir>/scripts/init-project.mjs --cwd <project-root> --roles pm,dev --tools claude-code,codex

第三步:确认图后端(仅当选了 dev

如果用户没有明确指定图后端,询问这个项目使用哪个代码图谱/知识库后端。可选项为:

  • codegraph(默认推荐):基于 tree-sitter AST 的本地代码图谱,通过 MCP 实时查询。需要用户按需手动创建 .codegraph/ 索引,初始化脚本不自动建图。
  • sourcegraph:基于 Sourcegraph 的代码搜索和引用查询。需要 Sourcegraph 实例或 MCP server,索引由用户自行搭建。
  • scip:基于 SCIP/LSIF 精确索引。需要已生成的 .lsif.scip 文件,索引由用户自行生成。
  • none:不启用任何图后端,所有代码查询走源码搜索和 git diff。

未指定时默认 codegraph(与历史行为一致)。把选择通过 --graph-backend 传给脚本:

node <skill-dir>/scripts/init-project.mjs --cwd <project-root> --roles dev --tools codex --graph-backend codegraph

如果用户在调用 skill 时已经明确指定了图后端(例如"用 sourcegraph 初始化项目"),则跳过此询问。非交互环境(CI、脚本调用)未指定时默认 codegraph,不阻塞流程。

第四步:填充产品上下文(仅当选了 pm

脚本对 pm 角色只写出 .loom/rules/product.md 模板(保留 {{...}} 占位符)。脚本运行后,问用户以下 5 题,再用 Edit 把答案填进 product.md,替换对应占位符:

  1. 产品名 + 一句话描述 → {{PRODUCT_NAME}} / {{PRODUCT_ONELINE}}
  2. 目标用户是谁 → {{TARGET_USERS}}
  3. 核心价值 → {{CORE_VALUE}}
  4. 主要平台(移动端 / PC / 两者)→ {{PLATFORM}}
  5. UI 风格(Material / Ant Design / 简洁 / 无要求)+ 原型受众(研发评审 / 用户测试 / 投资人 demo)→ {{UI_STYLE}} / {{PROTOTYPE_AUDIENCE}}

Read the full file on GitHub · 143 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago First seen · 143 lines · 48 tokens per session scan A 9f5472b41da8

Subscribe to this mod's changes

loom-init-project is a skill published in the GitHub repository xiqin/loom (5 stars, last pushed 1mo ago), licensed MIT. It adds 48 tokens to every session and 2,105 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

media-ingest

Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.

garrytan/gbrain · 52 tokens

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

agent-memory

../../../engineering/agent-memory/skills/agent-memory/SKILL.md.

alirezarezvani/claude-skills · 0 tokens

memory

Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.

opensquilla/opensquilla · 44 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens