Official agent skill

Generate Snapshot

by microsoft in microsoft/vscode-python-environments

Generate a codebase health snapshot for technical debt tracking and planning.

OfficialMITAuto-check passedDevelopment

Install Generate Snapshot

skills CLI
$ npx skills add microsoft/vscode-python-environments --skill generate-snapshot -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/vscode-python-environments generate-snapshot --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/vscode-python-environments.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/generate-snapshot .claude/skills/generate-snapshot && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
generate-snapshot
GitHub stars
141
Token cost
~1.1k tokens
SKILL.md length
344 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

Generate a codebase health snapshot for technical debt tracking and planning.

  • Works in 3 steps: Sort by priority_score descending → Top items = files that change often AND… → These are prime candidates for
  • Tasks that involve Technical debt
  • SKILL.md covers When to Use, How to Generate, Snapshot Structure and Interpreting Results, plus 1 more section
  • Calls python

What it does

Generate Snapshot is an agent skill from microsoft/vscode-python-environments, published by the product's own GitHub organization. Generate a codebase health snapshot for technical debt tracking and planning. Analyzes git history, code complexity, debt markers, and dependencies to identify hotspots and refactoring priorities.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Technical debt, Refactoring and Git workflow. It works with TypeScript. The repository describes itself as: VS Code extension for Python environment and package management. The licence is MIT.

When your agent uses it

  • Tasks that involve Technical debt
  • Tasks that involve Refactoring
  • Tasks that involve Git workflow

Example prompts

  • “/generate-snapshot”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Sort by priority_score descending
  2. Top items = files that change often AND are complex
  3. These are prime candidates for

What it can do on your machine

Read from SKILL.md and the folder at commit e4f9939. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Generate Snapshot loads about 1.1k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 344 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/vscode-python-environments at commit e4f9939, republished under its MIT licence (© microsoft). 344 words, ~1,078 tokens.

Download SKILL.mdSave it as .claude/skills/generate-snapshot/SKILL.md (or your agent's skills folder).
name
generate-snapshot
description
Generate a codebase health snapshot for technical debt tracking and planning. Analyzes git history, code complexity, debt markers, and dependencies to identify hotspots and refactoring priorities.
argument-hint
--output path --pretty

Generate Codebase Snapshot

This skill generates a comprehensive code health snapshot using the analysis modules in analysis/.

When to Use

  • During planning phase to identify work items
  • To find refactoring hotspots (high churn + high complexity)
  • To track technical debt over time
  • Before major releases to assess code health
  • To identify knowledge silos (bus factor risks)

How to Generate

powershell
# From repository root
python -m analysis.snapshot --output analysis-snapshot.json

Add --pretty flag to also print the JSON to stdout.

Note: The snapshot is written to the repository root (analysis-snapshot.json). This path is ignored by .gitignore.

Snapshot Structure

The snapshot contains these sections:

summary - High-level metrics dashboard
  • files_with_changes: Number of files with git changes
  • total_churn: Total lines added + deleted
  • high_complexity_files: Count of files with high complexity
  • todo_count, fixme_count: Debt marker counts
  • circular_dependency_count: Architectural issues
  • single_author_file_ratio: Bus factor indicator
priority_hotspots - Top 20 refactoring candidates

Files sorted by priority_score = change_count × max_complexity

json
{
    "path": "src/features/terminal/terminalManager.ts",
    "change_count": 45,
    "churn": 1200,
    "max_complexity": 18,
    "priority_score": 810
}

High priority_score = frequently changed AND complex = prime refactoring target.

git_analysis - Change patterns
  • hotspots: Most frequently changed files
  • temporal_coupling: Files that change together (hidden dependencies)
  • bus_factor: Knowledge concentration risks
complexity - Code complexity metrics
  • by_language.typescript: TypeScript file metrics (max_complexity, avg_complexity, function_count)
  • high_complexity_functions: Functions with cyclomatic complexity > 10
debt_indicators - Technical debt markers
  • debt_markers.by_type: TODO, FIXME, HACK comments by type
  • large_files: Files exceeding 500 lines of code
  • long_functions: Functions exceeding 50 lines
dependencies - Module coupling analysis
  • circular_dependencies: Cycles in import graph
  • highly_coupled_modules: Modules with fan-out > 10
  • hub_modules: Modules with fan-in > 10
  • layer_violations: Lower layers importing from higher layers

Interpreting Results

Priority Hotspots
  1. Sort by priority_score descending
  2. Top items = files that change often AND are complex
  3. These are prime candidates for:
    • Breaking into smaller modules
    • Adding tests before changes
    • Simplifying complex functions
Temporal Coupling

Files with coupling_ratio > 0.8 changing together indicate:

  • Hidden dependencies not visible in imports
  • Copy-paste code that should be shared
  • Features spread across unrelated files
Knowledge Silos

Files with author_count = 1 and change_count >= 3:

  • Single point of failure for knowledge
  • Consider documentation or pair programming
  • Higher risk for bugs during that author's absence
Circular Dependencies

Any cycles in the import graph:

  • Indicates tight coupling
  • Makes testing difficult
  • Consider introducing interfaces or restructuring

Example Usage in Planning

User: What should we work on next?

Agent: Let me generate a snapshot and analyze it...
[generates snapshot]

Based on the snapshot:

Top 3 priority items:
1. **src/features/terminal/terminalManager.ts** (priority: 810)
   - 45 changes, complexity 18
   - High churn indicates active development area
   - Recommend: Split terminal concerns into separate modules

2. **src/managers/common/nativePythonFinder.ts** (priority: 540)
   - 30 changes, complexity 18
   - Multiple FIXME markers found
   - Recommend: Address type guards and cache issues

3. **src/features/interpreterSelection.ts** (priority: 360)
   - 24 changes, complexity 15
   - Temporal coupling with settings files
   - Recommend: Reduce coupling with settings module

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/generate-snapshot of microsoft/vscode-python-environments.

Open the folder on GitHubat commit e4f9939

Compare with similar skills

Generate Snapshot next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Generate Snapshot compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Generate Snapshot this skillmicrosoft/vscode-python-environments141—~1.1kAutomated safety check: PassMIT
DRY Refactoring With jscpdkucherenko/jscpd6.4k—~2.1kAutomated safety check: PassMIT
jscpd Duplicate Code Detectorkucherenko/jscpd6.4k—~4.5kAutomated safety check: PassMIT
Dead Code Removal with Knipshift-editor/shift347—~1.8kAutomated safety check: PassApache-2.0
Code RefinerMathews-Tom/armory328—~3.1kAutomated safety check: PassMIT
Systematic Code Refactoringluongnv89/claude-howto42k—~3kAutomated safety check: PassMIT

Similar skills

  • Removes copy-paste duplication found by jscpd, starting with exact clones and hotspots, then renamed and near-miss copies, using proven refactoring strategies.

    6.4k GitHub stars~2.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Finds duplicated code in 220+ languages with jscpd, reports exact, renamed and near-miss clones in a compact agent-friendly format and measures duplication.

    6.4k GitHub stars~4.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Dead Code Removal with Knip

    shift-editor/shift

    Finds unused files, exports and class members with Knip, then verifies each candidate through reference tracing before removing anything, never using knip --fix.

    347 GitHub stars~1.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Code Refiner

    Mathews-Tom/armory

    Deep code simplification and refactoring preserving behavior across Python, Go, TypeScript, Rust.

    328 GitHub stars~3.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Systematic Code Refactoring

    luongnv89/claude-howto

    Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.

    42k GitHub stars~3k tokensUpdated 8 days ago
    DevelopmentAuto-check passed
  • Finds and implements evidence-backed simplifications in the ego-lite repository, such as dead code, duplicated state and speculative abstractions, without hiding behavior changes.

    17k GitHub stars~1.2k tokensUpdated 15 days ago
    DevelopmentAuto-check passed

More from microsoft/vscode-python-environments

All 9 skills in this repo
  • Cross Platform Paths

    microsoft/vscode-python-environments

    Official

    Critical patterns for cross-platform path handling in this VS Code extension.

    141 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Python Manager Discovery

    microsoft/vscode-python-environments

    Official

    Environment manager-specific discovery patterns and known issues.

    141 GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Run E2E Tests

    microsoft/vscode-python-environments

    Official

    Run E2E tests to verify complete user workflows like environment discovery, creation, and selection.

    141 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Run Integration Tests

    microsoft/vscode-python-environments

    Official

    Run integration tests to verify that extension components work together correctly.

    141 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Run Smoke Tests

    microsoft/vscode-python-environments

    Official

    Run smoke tests to verify extension functionality in a real VS Code environment.

    141 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Debug Failing Test

    microsoft/vscode-python-environments

    Official

    Debug a failing test using an iterative logging approach, then clean up and document the learning.

    141 GitHub stars~780 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Generate Snapshot

What does Generate Snapshot do?

Generate a codebase health snapshot for technical debt tracking and planning. Generate Snapshot is an agent skill from microsoft/vscode-python-environments, published by the product's own GitHub organization. Generate a codebase health snapshot for technical debt tracking and planning.

When should I use Generate Snapshot?

Generate Snapshot fits situations like: tasks that involve Technical debt; tasks that involve Refactoring; tasks that involve Git workflow.

How do I install Generate Snapshot in Claude Code?

Run `npx skills add microsoft/vscode-python-environments --skill generate-snapshot -a claude-code`. Or copy the skill folder (.github/skills/generate-snapshot in microsoft/vscode-python-environments) into .claude/skills/generate-snapshot in your project. Claude Code loads it when a task matches its description.

How do I install Generate Snapshot in Codex?

Run `npx skills add microsoft/vscode-python-environments --skill generate-snapshot -a codex`. Or copy the skill folder (.github/skills/generate-snapshot in microsoft/vscode-python-environments) into .agents/skills/generate-snapshot in your project. Codex loads it when a task matches its description.

Can I use Generate Snapshot in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/vscode-python-environments --skill generate-snapshot -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/generate-snapshot, .gemini/skills/generate-snapshot, .github/skills/generate-snapshot and .opencode/skills/generate-snapshot in your project.

What does Generate Snapshot need to run?

Going by SKILL.md and its folder, Generate Snapshot needs the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Generate Snapshot access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Generate Snapshot safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Generate Snapshot use?

Generate Snapshot is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Generate Snapshot use?

About 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Generate Snapshot?

Skills that share tags, products or a category with Generate Snapshot: DRY Refactoring With jscpd (kucherenko/jscpd, 6.4k stars), jscpd Duplicate Code Detector (kucherenko/jscpd, 6.4k stars), Dead Code Removal with Knip (shift-editor/shift, 347 stars) and Code Refiner (Mathews-Tom/armory, 328 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Generate Snapshot?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/vscode-python-environments, which has 141 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 8, 2026.

Source: microsoft/vscode-python-environments on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.