Skip to content
Back to skills

sourcesage-cli

ASecurity

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`.

  • 72 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added June 11, 2026
documentationgitdocumentation

Works with

  • cli

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned June 11, 2026

npx -y skills add Sunwood-ai-labs/SourceSage --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of sourcesage-cli?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for sourcesage-cli
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sunwood-ai-labs-sourcesage-cli/badge)](https://www.skillsdirectory.com/skills/sunwood-ai-labs-sourcesage-cli)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

1. 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 ...`.

2. 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`

3. 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 `--lite` mode, confirm the summary keeps the tree, Git info, statistics, and root README files while omitting the `## File Contents` section.

4. Report side effects and command mismatches.
   - Expect SourceSage to create `<repo>/.SourceSageignore` if it does not exist.
   - Treat `--ignore-file` as the supported ignore override.
   - Do not rely on `--use-ignore` unless the CLI is updated and re-verified, because the current CLI does not expose that flag.

## Command Notes

- Prefer `uv run sage` inside the SourceSage repo because `pyproject.toml` defines both `sage` and `sourcesage` entry 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 `sourcesage` or `sage` directly only when the package is already installed and `uv` is unavailable.
- Use `-l ja` or `-l en` for output language.
- Use `--lite` for first-pass exploration when ignore rules are not tuned yet or when full file excerpts would make the summary too large.
- Use `-o` when the user wants artifacts outside the repo root.
- Use `--repo` to 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.toml` and `sourcesage/cli.py` in this repo.

Files in this skill

  • .SourceSageignore2.1 KB
  • .vscode/settings.json324 B
  • AGENTS.md2.4 KB
  • CHANGELOG.md663 B
  • CLAUDE.md3.8 KB
  • CODE_OF_CONDUCT.md788 B
  • CONTRIBUTING.md1 KB
  • README.ja.md4.1 KB
  • SECURITY.md566 B
  • SKILL.md3.9 KB
  • agents/openai.yaml236 B
  • assets/release-header-v7.1.0.svg11.1 KB
  • assets/release-header-v7.2.0.svg10.9 KB
  • development/AGENT_MODE_DEVELOPMENT_PLAN.md431 B
  • docs/index.md1.6 KB
  • docs/package-lock.json85.9 KB
  • docs/package.json330 B
  • example/Repository_summary.md26.6 KB
  • pyproject.toml1.8 KB
  • requirements.txt35 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…