Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

claude-memoryClaude 记忆

Agent Skill

claude-memory 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,946

周安装

124

GitHub Stars

187

下载量

1,032
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:claude-memory(Claude 记忆)
来源仓库:https://github.com/melvynx/aiblueprint
仓库路径:skills/claude-memory
安装命令:
npx skills add https://github.com/melvynx/aiblueprint --skill claude-memory
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/melvynx/aiblueprint --skill claude-memory

简介

claude-memory 用于查找、检索和筛选相关信息。

  • 适合在需要根据关键词或任务场景快速定位候选结果时使用。
  • 可结合来源仓库和原始 README 核验具体用法。
  • 安装命令:npx skills add https://github.com/melvynx/aiblueprint --skill claude-memory。
  • 建议确认权限范围和维护状态,注意是否会触发联网、命令执行或文件读写。

SKILL.md

<core_principle> Memory files consume tokens from the context window. ~100-150 instruction slots available for your customizations. Keep files minimal — only include what the agent cannot discover on its own.

Two approaches:

  • CLAUDE.md — Single file, best for small projects (< 100 lines)
  • .claude/rules/ — Modular files with optional path-scoping, best for large projects </core_principle>

<quick_start> Run /init to auto-generate a CLAUDE.md. Or create manually:

# Project Name

## Tech Stack
- [Primary framework]
- [Key non-obvious libraries]

## Commands
- `npm run dev` - Dev server
- `npm test` - Run tests
- `npm run build` - Build

## Rules
- [2-3 critical project-specific rules]
  • Press # during a session to add memory items quickly
  • Use /memory to open CLAUDE.md in your editor </quick_start>

<file_hierarchy>

PriorityLocationScope
1 (Highest)Enterprise policy (managed by IT)All org users
2./CLAUDE.md or ./.claude/CLAUDE.mdTeam via git
2./.claude/rules/*.mdTeam via git
3~/.claude/CLAUDE.mdAll your projects
3~/.claude/rules/*.mdAll your projects
4 (Lowest)./CLAUDE.local.md (auto-gitignored)Just you

Claude recurses UP from current directory, loading all CLAUDE.md files found. Also discovers CLAUDE.md in subtrees when reading files in those directories.

Monorepo strategy: Root file defines WHEN; subtree files define HOW.

root/CLAUDE.md           # Universal: tech stack, git workflow
apps/web/CLAUDE.md       # Frontend-specific
apps/api/CLAUDE.md       # Backend-specific

</file_hierarchy>

<rules_directory> The .claude/rules/ directory splits instructions into focused markdown files.

Use .claude/rules/ when: many concerns, different rules for different file types, team maintains different areas. Use CLAUDE.md when: small project, universal rules, single source of truth.

Path-scoped rules use YAML frontmatter:

---
paths:
  - "src/api/**/*.ts"
---
# API Rules
- All endpoints must include input validation

Supported patterns: **/*.ts, src/**/*, src/**/*.{ts,tsx}, {src,lib}/**/*.ts

Rules without paths frontmatter load unconditionally.

See references/rules-directory-guide.md for complete guide including symlinks, user-level rules, and migration. </rules_directory>

<content_structure> Structure CLAUDE.md with only these sections:

  1. Project purpose (1-3 lines) — What the project is
  2. Tech stack (compact) — Only non-obvious technologies
  3. Commands — Non-obvious dev, build, and test commands
  4. Important files — Architecture-critical, non-obvious files only
  5. Rules — Prohibitions and constraints that prevent mistakes (highest-value lines)
  6. Workflow (optional) — Only if non-standard

Do NOT include:

  • Repository overviews (agent discovers structure itself)
  • Code style rules (linters enforce these)
  • Generic best practices ("write clean code", "DRY", "SOLID")
  • Redundant specs (copies of config files, env vars, schema descriptions)
  • Marketing/goals (vision statements, KPIs, roadmaps)
  • Verbose explanations (paragraphs where one line suffices)

See references/section-templates.md for ready-to-use templates. See references/project-patterns.md for framework-specific patterns. </content_structure>

<writing_rules> Golden rule: If someone with zero project context reads your CLAUDE.md and gets confused, Claude will too.

Be specific, never vague:

❌ "Format code properly" / "Write good tests" / "Follow best practices"
✅ "Run `pnpm lint` before committing" / "Tests in `__tests__/` using Vitest"

Prohibitions > positive guidance:

❌ "Try to use TanStack Form for forms"
✅ "NEVER use native form/useState for forms — ALWAYS use TanStack Form"

Show, don't tell: When format matters, show a concrete example (3-5 lines max).

Emphasis hierarchy: CRITICAL > NEVER > ALWAYS > IMPORTANT > YOU MUST

  • Put critical rules first in each section
  • Use bold + keyword for non-negotiable rules: **CRITICAL**: Never commit secrets

See references/prompting-techniques.md for advanced techniques. </writing_rules>

<size_limits>

  • Ideal: < 100 lines
  • Maximum: 150 lines before performance degrades
  • Over 200 lines: directives start getting lost

When exceeding limits, split into .claude/rules/ files or link to separate docs:

- **API patterns**: See [docs/api-patterns.md](docs/api-patterns.md)
- **Testing guide**: See [docs/testing-guide.md](docs/testing-guide.md)

CLAUDE.md supports importing: @docs/coding-standards.md (relative/absolute paths, ~ expansion, up to 5 levels deep, not evaluated inside code blocks). </size_limits>

Before creating or updating memory files, use AskUserQuestion:

  • Option 1: Single CLAUDE.md — < 100 lines, simple project, universal rules
  • Option 2: Modular.claude/rules/ — 100+ lines, different rules for different files

Creating new memory:

  1. Start with /init or minimal template
  2. Add tech stack and commands first
  3. Add rules only as you encounter friction
  4. Test with real tasks, iterate based on Claude's behavior

Maintaining:

  1. Review quarterly or when project changes significantly
  2. Remove outdated instructions
  3. Add patterns that required repeated explanation
  4. Use # for quick additions during work

Troubleshooting:

ProblemSolution
Claude ignores instructionsReduce file size, add emphasis (CRITICAL, NEVER)
Context overflowUse /clear, split into.claude/rules/
Instructions conflictConsolidate, use hierarchy (root vs subtree)
Path rules not applyingVerify glob pattern matches target files

<init_workflow>

/claude-memory init — Create Minimal CLAUDE.md

When the user argument contains "init", execute this workflow to scaffold a CLAUDE.md with only the essential sections.

Step 1: Detect project context

Read package.json (or equivalent: pyproject.toml, Cargo.toml, go.mod, etc.) to detect:

  • Project name
  • Tech stack (framework, language)
  • Available scripts/commands (dev, build, test)

Also check for existing linter configs (ESLint, Biome, Prettier, tsconfig) — do NOT include rules they already enforce.

Step 2: Identify important files

Scan for non-obvious architecture-critical files. Look for:

  • Auth config files
  • Server action wrappers, API helpers
  • Database schema files
  • Custom middleware or shared utilities
  • Skip standard framework files (package.json, tsconfig, next.config, etc.)

Step 3: Generate CLAUDE.md

Create the file with ONLY these sections. Each section should be compact — the whole file should be under 50 lines.

# [Project Name]
[One-line description of what this project is]

## Tech Stack
- [Only non-obvious technologies — skip deps detectable from config files]

## Commands
- `[dev command]` - Dev server
- `[build command]` - Build
- `[test command]` - Tests
- [Any non-obvious commands like db:push, seed, etc.]

## Important Files
- [Only files the agent wouldn't discover naturally]

## Rules
- [Leave empty with a comment: "Add project-specific rules as you encounter friction"]

Step 4: Present and write

Show the generated file to the user. Write it to ./CLAUDE.md after approval.

Rules:

  • NEVER include directory structure, code style rules, generic best practices, or marketing text
  • NEVER include anything a linter or TypeScript already enforces
  • Target: 20-50 lines. If it's longer, you're including too much
  • The Rules section starts empty — it gets populated over time as mistakes happen </init_workflow>

<optimize_workflow>

/claude-memory optimize — Deep CLAUDE.md Cleanup

When the user argument contains "optimize", execute this workflow.

CRITICAL — Step 0 is MANDATORY. Do NOT skip it. Do NOT start optimizing without reading the guide first.

Step 0: Read the optimization guide (REQUIRED FIRST)

YOU MUST use the Read tool on {SKILL_PATH}/references/optimize-guide.md BEFORE doing anything else. This file contains the research data (ETH Zurich study), the 6 bloat categories with specific examples, target metrics, and before/after examples. Without reading it, you will miss removal criteria and produce a subpar optimization.

Step 1: Inventory

Read every CLAUDE.md, CLAUDE.local.md, and .claude/rules/*.md in the project. Count total lines.

Step 2: Read linter configs

Read ESLint/Biome/Prettier/TypeScript configs. Any CLAUDE.md line duplicating an enforced rule → delete.

Step 3: Apply the 6 bloat categories from the guide

For each line ask: "Can the agent discover this by reading the project, or does a linter enforce this?" If yes → delete.

Remove everything matching:

  1. Linter-enforced rules (ESLint, Prettier, Biome, TypeScript strict)
  2. Marketing / goals / vision (zero code value)
  3. Obvious info the agent discovers itself (directory structure, framework defaults, deps from package.json)
  4. Verbose explanations (paragraphs where 1 line suffices, tutorials, history)
  5. Redundant specs (copies of config files, schema descriptions, env var lists)
  6. Generic best practices ("write clean code", "DRY", "SOLID")

Step 4: Keep only essentials

  • Project purpose (1-3 lines)
  • Tech stack (compact, non-obvious only)
  • Core commands (non-obvious only)
  • Testing commands
  • Important files (non-obvious only)
  • Project-specific rules (prohibitions + constraints)
  • Workflow (only if non-standard)

Step 5: Compress

  • Paragraphs → bullet points
  • 3-line rules → 1-line rules
  • Zero filler words ("In order to", "It's important to note that")
  • Merge related items

Step 6: Present diff

Show before/after with line counts. For each removal, cite which bloat category it falls under. Let user approve before applying changes.

Target: < 100 lines ideal, < 150 max. </optimize_workflow>

<reference_guides>

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.73%
按下载量换算369

Claude

30.28%
按下载量换算312

Cursor

18.15%
按下载量换算187

Gemini CLI

8.98%
按下载量换算93

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills