项目模块管理

SKILL开发
开发 未标注权限 许可证不明确
安装这个技能

项目模块管理。自动发现项目架构,用11位分层编码将文件映射到模块,并跟踪更改。当你在探索不熟悉的项目、根据模块查找代码或跟踪代码变化时可以调用它。

一句话选型结论

按资料字段整理

项目模块管理是开发类的 Agent Skill,安装方式未标注,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类开发 安装方式未标注 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

未标注
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install user_568e7d7c/pmm-modular
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

开发
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方user_568e7d7c仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式未标注安装包 community
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 1791712901
正文体量14.7 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
写代码与改 bug

按需求补代码、定位并修掉报错。

读仓库与生成改动

让模型读懂项目结构,再给出可落地的改动。

跑测试与排查故障

按现象排查问题,补测试用例并复跑。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在开发场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
项目模块管理当前 未标注权限 未标注 未标注 未标注 有
技能审查员 浏览器控制 ClawHub 市场 877.9 万 OpenClaw 有
Vercel React 最佳实践 浏览器控制 GitHub 仓库 849.1 万 Codex、Claude、Cursor 有
GitHub 代码协作 联网访问 ClawHub 市场 763.3 万 OpenClaw 有
网页设计指南 联网访问 GitHub 仓库 668.6 万 Codex、Claude、Cursor 有
本体论 只读 ClawHub 市场 663.7 万 OpenClaw 有

SKILL.md 全文

14.7 KB
模型实际读到的说明书原文,来自技能仓库

Project Modular Management (PM2)

> Zero-configuration project structure analyzer with 11-digit hierarchical encoding. Drop it into any project, run once, get a complete module map with change tracking.

Features

Feature Description
11-digit hierarchical encoding L PPP OOO FFFF — encodes full directory tree depth and ordering
Append-only coding New items get next available number; deleted items become tombstones (never re-assigned)
Virtual grouping Root-level non-source files (e.g., 300+ .md files) automatically grouped into a virtual "Documentation" directory
Auto-discovery Scans project tree, respects .gitignore, auto-categorizes files
Framework detection Recognizes React, Vue, Next.js, Node, Go, Python, PHP, Java
Change tracking Compares snapshots, logs added/removed/modified files with size/LoC deltas
Multiple formats Text tree, Markdown, JSON output
Self-healing Delete data/ dir anytime — auto-rebuilds on next run
Configurable .modularrc.json for custom skip patterns per project
Enhanced error handling Friendly error messages with error codes and troubleshooting tips
Boundary detection Warns when project exceeds recommended size limits

11-Digit Encoding Scheme

L PPP OOO FFFF
│ ─┬─  ─┬─  ─┬─
│  │    │    └── File index (0000 = directory or standalone file)
│  │    │         0001+ = file inside a directory (sub-index)
│  │    └────── Fixed separator "000"
│  └────────── Level sequential number (001-999), global per level
└──────────── Level letter (A = root depth 1, B = depth 2, C = depth 3, ...)

Encoding Rules

Rule Description
DFS pre-order Codes assigned by depth-first traversal: root → children in order
Shared PPP pool Directories and files at the same level share the PPP number space
Append-only New modules/files get the next available PPP; deleted codes are never recycled
Tombstones Deleted items retain their code entry marked with deleted_at; PPP stays consumed
Virtual grouping Root files not matching config patterns are grouped under a virtual "Documentation" node (B-level)

Example

yunheiku/
├── api/                     A0010000000
│   ├── .env                   B0010000000
│   ├── routes/                B0020000000
│   │   ├── query.js             C0010000000
│   │   └── submit.js            C0020000000
│   └── services/              B0030000000
│       └── token-cache.js       C0030000000
├── src/                      A0020000000
│   ├── App.tsx                 B0040000000
│   └── components/             B0050000000
│       └── Header.tsx            C0040000000
└── docs/                     A0030000000
    └── README.md               B0060000000

When to Use This Tool

Recommended Scenarios

Scenario Description
New project onboarding Run once to get a bird's-eye view of the architecture
Before coding Check the module map to understand which files to touch
After coding Run again to confirm the change scope matches expectations
Code review Use the change log to understand what was modified and why
CI integration Generate a Markdown report as a build artifact
Team alignment Share .modularrc.json to ensure consistent module boundaries
Project handover Document the project structure for new team members
Refactoring planning Understand the current structure before restructuring

Not Recommended For

Scenario Reason
Projects with >5000 files May be slow and consume significant memory
Projects with >15 levels of nesting Deep nesting can cause performance issues
Read-only or network drives Permission restrictions may cause errors
Temporary or throwaway projects Overhead not justified for short-lived projects
Projects with highly dynamic file structures Frequent changes may overwhelm the change log

Quick Start

# First run — auto-discovers module structure
python generate_module_map.py

# Subsequent runs — stable codes, detects changes
python generate_module_map.py

# Generate a Markdown report
python generate_module_map.py --format md -o modules.md

# JSON export
python generate_module_map.py --format json -o modules.json

# Force re-discovery (discard existing codes)
python generate_module_map.py --reset

# Run on a specific project
python generate_module_map.py /path/to/project

# Suppress progress messages
python generate_module_map.py --quiet

# Force run even if project exceeds recommended limits
python generate_module_map.py --force

Output Example

======================================================================
  React Project Module Map
  Project : D:\.workbuddy\yunheiku
  Generated: 2026-07-16 21:30:00 | Files: 962 | LoC: 251.8k
======================================================================

|-- [D] api                              A0010000000
|   |-- [F] .env                             B0010000000  110B
|   |-- [D] routes                           B0020000000
|   |   +-- [F] query.js                         C0010000000  6.8KB
|   +-- [D] services                         B0030000000
|       +-- [F] token-cache.js                   C0020000000  2.9KB
|-- [D] src                              A0020000000
|   |-- [F] App.tsx                          B0040000000  1.2KB
|   +-- [D] components                       B0050000000
|       +-- [F] Header.tsx                       C0030000000  892B
+-- [D] Documentation                    A0030000000
    |-- [F] README.md                        B0060000000  2.1KB
    +-- [F] SETUP.md                          B0070000000  3.5KB

======================================================================
  Change Log
======================================================================
  + Added [A0040000000] new-module/index.ts (1.2KB, 45 lines)
  - Removed [B0080000000] old-file.ts (tombstoned)
  ~ Modified [C0030000000] components/Header.tsx (892B -> 1.2KB)

  Total: 3 change(s)

  Data: .../yunheiku-modular/data/a43bf6a5

Configuration (.modularrc.json)

Place in your project root to customize behavior:

{
  "skip_dirs": ["generated", "fixtures"],
  "skip_files": ["*.gen.ts"]
}
Key Type Default Description
skip_dirs string[] — Additional directories to ignore
skip_files string[] — Additional file patterns to ignore

Data Storage

All data is kept inside the skill directory, isolated per project (MD5 hash of project path):

skills/yunheiku-modular/
├── SKILL.md
├── generate_module_map.py
└── data/                          # Safe to delete — auto-rebuilds
    └── a43bf6a5/                  # One folder per project
        ├── tree-config.json       # Stable code assignments + tombstones
        ├── snapshot.json          # Full file metadata snapshot
        └── change-log.json        # Last 50 change entries

Why Append-Only + Tombstones?

  • Stability: A file's code never changes once assigned, so external references (docs, tickets, PRs) stay valid
  • Traceability: Tombstones show what was deleted and when
  • No cascading renumbers: Adding a file never shifts codes of other files
  • Git-friendly: Predictable, merge-conflict-free encoding

Error Codes

Code Type Description Troubleshooting
E001 ProjectNotFound No project markers detected Ensure you're in a project directory with package.json, go.mod, etc.
E002 PermissionDenied Insufficient permissions Run with appropriate permissions or check directory access
E003 PathError Invalid or non-existent path Verify the path exists and is accessible
E004 ConfigError Error loading configuration Check .modularrc.json for valid JSON syntax
E005 DataError Error reading/writing project data Check data directory permissions
E006 EncodingError File encoding issue File may have unsupported encoding; check file contents
E007 ProjectTooLarge Project exceeds recommended limits Use --force to override or consider filtering more files
E008 UnknownError Unexpected error Check error details for more information

Warnings

Code Type Description Action
W001 LargeProject Project has many files Consider using --force or reducing scope
W002 DeepNesting Deep directory nesting Consider simplifying project structure
W003 SpecialCharacters Files with special characters Rename files to avoid special characters
W004 LongPaths Paths exceeding recommended length Shorten directory names or reorganize
W005 EmptyProject No source files found Verify skip patterns aren't too aggressive

Best Practices

Do's

  1. New project onboarding: Run once to get a bird's-eye view of the architecture
  2. Before coding: Check the module map to understand which files to touch
  3. After coding: Run again to confirm the change scope matches expectations
  4. Code review: Use the change log to understand what was modified and why
  5. CI integration: Generate a Markdown report as a build artifact
  6. Team alignment: Share .modularrc.json to ensure consistent module boundaries
  7. When adding files: Just create them — PM2 auto-assigns the next available code on next run
  8. When deleting files: Safe to delete — PM2 tombstones the old code, new files won't reuse it

Don'ts (Anti-Patterns)

  1. Don't run on extremely large projects (>5000 files) — it will be slow and memory-intensive
  2. Don't expect real-time updates — PM2 runs on-demand, not continuously
  3. Don't modify the data directory manually — let PM2 manage it
  4. Don't use for temporary directories — overhead not justified
  5. Don't rely on module codes for runtime logic — codes are for reference only
  6. Don't panic if you see warnings — warnings don't prevent analysis from completing

FAQ

Q: What does the error "Project exceeds recommended size limits" mean?

A: PM2 limits projects to 5000 files by default to ensure reasonable performance. If your project has more files, you can either:
- Use --force flag to override the limit
- Add more directories to .modularrc.json's skip_dirs to reduce scope
- Run PM2 on subdirectories separately

Q: Why do deleted files still show up in the codes?

A: PM2 uses a "tombstone" system — deleted files retain their codes but are marked as deleted. This ensures:
- References to those codes remain valid (e.g., in documentation or tickets)
- New files don't accidentally reuse old codes
- You can see what was deleted and when

Q: Can I integrate PM2 into my CI pipeline?

A: Yes! Add this to your CI workflow:

python generate_module_map.py --format md -o module-report.md

Then upload module-report.md as an artifact.

Q: How do I reset all codes and start fresh?

A: Run with --reset flag:

python generate_module_map.py --reset

This will discard all existing codes and re-discover the project from scratch.

Q: My project has no source files after filtering. What's wrong?

A: Check your .modularrc.json — you may have over-aggressive skip patterns. Also verify that your .gitignore isn't excluding too much.

Q: Can I use PM2 on network drives or read-only directories?

A: PM2 requires write access to its data/ directory for storing snapshots and configs. Read-only project directories should work as long as the data directory is writable.

Q: What happens if PM2 encounters a file it can't read?

A: PM2 will skip unreadable files with a warning and continue processing. The file will show "N/A" for size and line count in the output.

Q: How do I handle special characters in file paths?

A: PM2 will warn about files with special characters but will still process them. For best results, rename files to use only alphanumeric characters, underscores, and hyphens.

Q: Can I use PM2 with other tools?

A: Yes! PM2 can be integrated with:
- VS Code: Add a task to run PM2 on save
- Git hooks: Run on pre-commit to verify change scope
- Project management tools: Export JSON and parse in your workflow
- Documentation generators: Use Markdown output in your docs

Q: How often should I run PM2?

A: It depends on your workflow:
- Daily: For active development to track changes
- Before/after major changes: To document scope
- On demand: When you need to understand the current structure

Q: What if I move a file?

A: Moving a file is treated as deleting the old path and adding a new path. The old code becomes a tombstone, and the new location gets a new code. To preserve the code, you would need to manually update tree-config.json.

Tool Integration Examples

VS Code Task

Add this to .vscode/tasks.json:

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Generate Module Map",
      "type": "shell",
      "command": "python generate_module_map.py --format md -o MODULE_MAP.md",
      "group": "build",
      "presentation": {
        "reveal": "always",
        "panel": "new"
      }
    }
  ]
}

Git Pre-Commit Hook

Create .git/hooks/pre-commit:

#!/bin/bash
python generate_module_map.py --format md -o MODULE_MAP.md
git add MODULE_MAP.md

GitHub Actions Workflow

Create .github/workflows/module-map.yml:

name: Generate Module Map
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: python generate_module_map.py --format md -o module-report.md
      - uses: actions/upload-artifact@v4
        with:
          name: module-report
          path: module-report.md

Limitations

  • Performance: Best for projects under 5000 files and 15 directory levels deep
  • Memory: Large projects may consume significant memory during analysis
  • Real-time: PM2 runs on-demand; it doesn't monitor for file changes automatically
  • Encoding: Files with non-UTF-8 encoding may not be processed correctly
  • Permissions: Requires read access to project files and write access to data directory

常见问题

5 问
答案由本站依据条目字段整理
项目模块管理怎么安装?

在支持 Skills 的客户端里执行:skillhub install user_568e7d7c/pmm-modular。安装方式为未标注。装完刷新技能列表或重开客户端。

项目模块管理支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

项目模块管理权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

项目模块管理收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

项目模块管理用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。