workspace-ecosystem-audit
Provides a methodology and tools for deep inventory and purpose-aware review of local AI/agent ecosystems, focusing on identifying configurations, code, dependencies, and potential risks. Use for understanding and managing your development environment.
- License 许可
- MIT
- 最近更新
- 2026-05-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- workspace-ecosystem-audit
- description
- Provides a methodology and tools for deep inventory and purpose-aware review of local AI/agent ecosystems, focusing on identifying configurations, code, dependencies, and potential risks. Use for understanding and managing your development environment.
03 SKILL.md 正文
Workspace Ecosystem Audit
Overview
This skill provides a methodology and script for conducting a deep inventory and purpose-aware review of local AI/agent ecosystems. It helps to index, summarize, and reason about files beyond just their names, capturing their intent, code function, and configuration roles across various development environments.
Key Components
- Inventory Script (
scripts/inventory.py): A Python script to scan directories, collect file metadata (path, size, type, hash, preview), and output a structured JSON manifest. - Workflow: A defined process for using the script, slicing the data, reading and summarizing files, identifying risks, and refreshing the inventory.
- Reading Guidance: Prioritization for examining configuration files, agent states, code, and logs.
Methodology
1. Scanning and Inventory
Run the inventory.py script against specified root directories (e.g., .claude, .gemini, .qwen, .codex). Use flags to tune the scan (e.g., --max-hash-bytes, --max-preview-bytes) to manage performance and output size. The output is a JSON file containing detailed metadata for each scanned file.
2. Data Slicing and Analysis
Use tools like jq, pandas, or custom scripts to filter the JSON manifest by file type, path prefix, size, or modification time. This allows for manageable batches of files to be analyzed.
3. File Purpose and Intent Review
For selected files or directories:
- Read Content: Use
read_fileor command-line tools (rg,python) to inspect content. - Summarize: Capture the file's intent (configuration, code, log, asset, cache).
- Identify Risks: Look for secrets, PII, redundant caches, broken links, or upgrade opportunities.
4. Risk Assessment and Action Planning
Based on the review, identify actionable items:
- Secrets Management: Flag sensitive information that needs secure handling.
- Cache Cleanup: Identify large or stale caches for potential removal.
- Refactoring Opportunities: Note code duplication or areas that could benefit from improved structure.
- Documentation Gaps: Identify components lacking adequate explanation.
Script Usage
The inventory.py script offers several flags:
--roots: Specify directories to scan.--out FILE: Define the output JSON file path.--max-hash-bytes N: Limit hashing to files under N bytes.--max-preview-bytes N: Store only the first N bytes of text files.--follow-symlinks: Include targets of symbolic links.--exclude-dir-name: Skip specified directories (e.g.,.git,.cache).
Reading Guidance
Prioritize the review of:
- Configuration files (
*.json,*.toml,*.yaml,.mdfrontmatter) - Agent state and history (
history.jsonl,sessions/) - Code and scripts
- Sensitive information placeholders
- Large cache files
Best Practices
- Batching: Process findings in manageable batches.
- Version Control: Keep the
inventory.jsonfile under version control to track changes over time. - Iterative Refinement: Re-run scans after making changes to verify impact.
- Security First: Be cautious when handling files identified as potential secrets or PII.
Generalization Notes
The core principles of an ecosystem audit—inventory, analysis, risk identification, and action planning—are general. While the provided script and target directories are specific to a local AI/agent setup, the methodology can be applied to any project to gain a comprehensive understanding of its components and potential issues.
Quick Start
- Run the inventory script for target roots (defaults cover all agent dirs):
python scripts/inventory.py \ --roots /Users/steven/.claude /Users/steven/.claude-server-commander /Users/steven/.codex /Users/steven/.cursor /Users/steven/.gemini /Users/steven/.grok /Users/steven/.qodo /Users/steven/.qwen \ --out /Users/steven/.codex/skills/workspace-ecosystem-audit/inventory.json - Open the JSON in any viewer; sort by
type,ext,size_bytes, ormtime_isoto find hotspots. - For semantic/file-purpose review, sample paths from the manifest and read inline with
rg -n "" <path>orpython - <<'PY' ....
Workflow (batches recommended)
- Scan: run
inventory.pywith--max-hash-bytesand--max-preview-bytestuned to avoid huge files. - Slice: use jq or pandas to filter by
ext,type, orpath_prefix(per directory) for manageable batches. - Read & Summarize: for each slice, summarize intent: configs, creds placeholders, logs, caches, code, assets. Capture findings in your working notes or a new
summary_<dir>.md. - Risk/Action: mark secrets, redundant caches, broken links, and upgrade opportunities (extensions, agents, models).
- Refresh: re-run scans after changes; keep
inventory.jsonversioned.
Script Flags
--roots ...space-delimited list of directories.--out FILEoutput JSON (defaultinventory.jsonin CWD).--max-hash-bytes Nhash only files ≤ N bytes (default 2_000_000).--max-preview-bytes Nstore first N bytes of text-ish files (default 4000).--follow-symlinksto include symlink targets (default: record link only).--exclude-dir-name .git .cache ...to skip noisy trees.
References
- Targets list:
references/targets.md - Use
rg --files+rg -nfor fast content search. - For large JSONL (histories), sample with
python - <<'PY' ...to avoid loading whole files.
Validation
- Optional:
python scripts/inventory.py --roots ... --out /tmp/inventory.json --max-hash-bytes 0 --max-preview-bytes 0for fastest structural map.
04 同仓库更多 Skills
rest-api-design
暂无简介
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
writing-rules
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
workflow-bootstrap
Defines mandatory workflows and where Supremepower/Gemini capabilities live. Use when starting creative work, multi-step implementation, or when the user asks how skills and agents are organized. Ensures brainstorm before coding and plan-before-implement discipline.
verification-before-completion
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always