@sunwood-ai-labs/sourcesage-cli
AGenerate AI-friendly repository documentation with the SourceSage CLI. Use when Codex needs to run `sage` or `sourcesage` to create `.SourceSageAssets/Repository_summary.md`, analyze the current repository or another local repository, switch the output language between English and Japanese, use `--lite` to keep the summary small, change the output directory, or optionally create a deprecated tag-diff release report with `--diff`.
Install
agr install @sunwood-ai-labs/sourcesage-cli --target claudeWrites 15 files into .claude/skills/, pinned to git-3c48c3dd.
- .claude/skills/sourcesage-cli/.SourceSageignore
- .claude/skills/sourcesage-cli/.gitignore
- .claude/skills/sourcesage-cli/AGENTS.md
- .claude/skills/sourcesage-cli/CHANGELOG.md
- .claude/skills/sourcesage-cli/CLAUDE.md
- .claude/skills/sourcesage-cli/CODE_OF_CONDUCT.md
- .claude/skills/sourcesage-cli/CONTRIBUTING.md
- .claude/skills/sourcesage-cli/LICENSE
- .claude/skills/sourcesage-cli/README.ja.md
- .claude/skills/sourcesage-cli/README.md
- .claude/skills/sourcesage-cli/SECURITY.md
- .claude/skills/sourcesage-cli/SKILL.md
- .claude/skills/sourcesage-cli/pyproject.toml
- .claude/skills/sourcesage-cli/requirements.txt
- .claude/skills/sourcesage-cli/test_results.txt
Document
name: sourcesage-cli
description: Generate AI-friendly repository documentation with the SourceSage CLI. Use when Codex needs to run sage or sourcesage to create .SourceSageAssets/Repository_summary.md, analyze the current repository or another local repository, switch the output language between English and Japanese, use --lite to keep the summary small, change the output directory, or optionally create a deprecated tag-diff release report with --diff.
SourceSage CLI
Overview
Use the SourceSage CLI from this repository checkout to generate repository summaries for the current repo or another local repo.
Prefer the local checkout over assuming sourcesage is globally installed. In this repository layout, the SourceSage tool root is the directory that contains this SKILL.md.
Workflow
-
Resolve the SourceSage tool root and the target repository.
- If the user did not specify another repo, analyze the current workspace.
- If the current workspace is not the SourceSage repo, run SourceSage from its own checkout with
uv run --directory <sourcesage-root> sage ....
-
Pick the smallest command that satisfies the request.
- Current repo summary:
uv run sage - Current repo summary in lite mode:
uv run sage --lite - Current repo summary in Japanese:
uv run sage -l ja - Another repo with default output inside that repo:
uv run --directory <sourcesage-root> sage --repo "<target-repo>" - Another repo in lite mode:
uv run --directory <sourcesage-root> sage --repo "<target-repo>" --lite - Another repo with explicit output directory:
uv run --directory <sourcesage-root> sage --repo "<target-repo>" -o "<output-dir>" - Deprecated diff report:
uv run --directory <sourcesage-root> sage --repo "<target-repo>" --diff
- Current repo summary:
-
Verify the generated artifacts after every run.
- Repository summary:
<output-dir>/.SourceSageAssets/Repository_summary.md - Deprecated diff report:
<output-dir>/.SourceSageAssets/RELEASE_REPORT/Report_<latest-tag>.md - Open the generated markdown and summarize the important results instead of only reporting that the command ran.
- In
--litemode, confirm the summary keeps the tree, Git info, statistics, and root README files while omitting the## File Contentssection.
- Repository summary:
-
Report side effects and command mismatches.
- Expect SourceSage to create
<repo>/.SourceSageignoreif it does not exist. - Treat
--ignore-fileas the supported ignore override. - Do not rely on
--use-ignoreunless the CLI is updated and re-verified, because the current CLI does not expose that flag.
- Expect SourceSage to create
Command Notes
- Prefer
uv run sageinside the SourceSage repo becausepyproject.tomldefines bothsageandsourcesageentry points. - Prefer
uv run --directory <sourcesage-root> sage ...outside the SourceSage repo so the command uses this checkout without requiring a global install. - Fall back to
sourcesageorsagedirectly only when the package is already installed anduvis unavailable. - Use
-l jaor-l enfor output language. - Use
--litefor first-pass exploration when ignore rules are not tuned yet or when full file excerpts would make the summary too large. - Use
-owhen the user wants artifacts outside the repo root. - Use
--repoto analyze another repository from this checkout.
Validation
- Run the chosen command instead of only describing it.
- Confirm that the expected markdown file exists.
- Read the generated output and report the path plus a short summary of what was produced.
- Re-run the exact command after changing any execution instructions or docs that mention it.
Avoid
- Do not assume README examples are authoritative when they differ from
sourcesage/cli.py. - Do not overwrite existing artifacts silently when the user asked for a specific destination and it already contains results.
- Do not describe SourceSage usage from memory when you can inspect
pyproject.tomlandsourcesage/cli.pyin this repo.
Trustgrade A
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- passLicense
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-3c48c3dd5e842026-07-29