inspecting-skills/SKILL.md
Discovers and indexes Python code in skills, enabling cross-skill imports. Use when importing functions from other skills or analyzing skill codebases.
npx skillsauth add oaustegard/claude-skills inspecting-skillsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Discover Python code across skills and enable universal imports. Solves the dash-underscore naming mismatch between skill directories (e.g., browsing-bluesky) and Python imports (e.g., browsing_bluesky).
import sys
sys.path.insert(0, '/home/user/claude-skills')
from inspecting_skills import setup_skill_path, skill_import
from inspecting_skills import skill_import
# Import by skill name (dash or underscore form)
bsky = skill_import("browsing-bluesky")
posts = bsky.search_posts("python")
# Import specific functions
search, profile = skill_import("browsing-bluesky", ["search_posts", "get_profile"])
from inspecting_skills import setup_skill_path
# Configure once at session start
setup_skill_path("/home/user/claude-skills")
# Now import skills directly (underscore form)
from browsing_bluesky import search_posts, get_profile
from remembering import remember, recall
from inspecting_skills import list_importable_skills
skills = list_importable_skills()
for s in skills:
print(f"{s['name']} -> import {s['module_name']}")
| Function | Purpose |
|----------|---------|
| discover_skill(path) | Analyze a single skill directory |
| discover_all_skills(root) | Find all skills with Python code |
| find_skill_by_name(name, root) | Find skill by name (either form) |
| skill_name_to_module(name) | Convert "browsing-bluesky" to "browsing_bluesky" |
| Function | Purpose |
|----------|---------|
| index_skill(layout) | Extract symbols from a discovered skill |
| index_all_skills(root) | Index all skills in repository |
| generate_registry(root, output) | Create registry.json manifest |
| Function | Purpose |
|----------|---------|
| setup_skill_path(root) | Enable transparent skill imports |
| skill_import(name, symbols) | Import skill or specific symbols |
| register_skill(name, path) | Register skill at custom path |
| list_importable_skills() | List all importable skills |
Skills organize Python code in three patterns:
browsing-bluesky/
SKILL.md
__init__.py # Re-exports from scripts/
scripts/
__init__.py
bsky.py # Main implementation
remembering/
SKILL.md
__init__.py # Re-exports functions
memory.py # Core functionality
boot.py
config.py
simple-skill/
SKILL.md
__init__.py # Contains all code
Create a registry.json for offline symbol lookup:
from inspecting_skills import generate_registry
from pathlib import Path
registry = generate_registry(
Path("/home/user/claude-skills"),
output_path=Path("registry.json")
)
# Registry structure:
# {
# "version": "1.0.0",
# "skills": {
# "browsing-bluesky": {
# "module_name": "browsing_bluesky",
# "exports": ["search_posts", "get_profile", ...],
# "modules": [...]
# }
# }
# }
from inspecting_skills import discover_skill, index_skill
from pathlib import Path
# Discover the skill layout
layout = discover_skill(Path("/home/user/claude-skills/remembering"))
print(f"Layout: {layout.layout_type}")
print(f"Has __init__.py: {layout.has_init}")
print(f"Python files: {[f.name for f in layout.python_files]}")
# Index symbols
index = index_skill(layout)
for module in index.modules:
print(f"\n{module.file_path}:")
for sym in module.symbols:
print(f" {sym.kind} {sym.name}{sym.signature or ''}")
This skill complements mapping-codebases which generates _MAP.md files:
Use both together:
mapping-codebases for navigation and code reviewinspecting-skills for actual code imports and execution# If skill_import fails, check:
# 1. Skill exists and has __init__.py
from inspecting_skills import discover_skill
layout = discover_skill(Path("/path/to/skill"))
print(layout.has_init) # Must be True for importing
# 2. Skills root is configured
from inspecting_skills import get_skills_root
print(get_skills_root())
# 3. Symbol is exported in __all__
import ast
init_code = open("/path/to/skill/__init__.py").read()
# Check for __all__ definition
# Manually set skills root
from inspecting_skills import set_skills_root
set_skills_root("/home/user/claude-skills")
@dataclass
class SkillLayout:
name: str # "browsing-bluesky"
path: Path # Full path to skill directory
layout_type: str # "scripts" | "root" | "package" | "none"
python_files: list[Path]
has_init: bool # Can be imported as package
entry_module: str # "browsing_bluesky"
@dataclass
class SkillIndex:
name: str # "browsing-bluesky"
module_name: str # "browsing_bluesky"
layout_type: str
modules: list[ModuleIndex]
exports: list[str] # From __all__
@dataclass
class Symbol:
name: str # Function/class name
kind: str # "function" | "class" | "method"
signature: str | None # "(self, x: int)"
line: int | None # 1-indexed
docstring: str | None # First line
children: list[Symbol] # Methods for classes
development
Write effective instructions for Claude: project instructions, standalone prompts, and skill content. Use when users need help writing prompts, setting up project instructions, choosing between instruction formats, or improving how they communicate with Claude. Covers writing principles, model-aware calibration, and format selection. For building and testing complete skills, use skill-creator instead.
data-ai
Discover and load skills on demand from /mnt/skills/user/. Use when you need a capability but don't know which skill provides it, when the boot-emitted skill list is names-only and you need a full description, or when you want to list the catalog. Verbs are list (names only), search (rank by name/description match against a query), and show (emit the full SKILL.md for a named skill).
documentation
Reads the visual content of slides, pages, and images the way a human would, not just their embedded text. Use when a PPTX or PDF has image slides, screenshots, charts, scanned figures, or flattened-to-image layouts that the built-in pptx/pdf skills read as empty; when asked to transcribe, describe, OCR, or extract what is shown in an image, slide deck, or document page; or when embedded-text extraction returned little or nothing from a visually rich file. Triggers on 'read this deck', 'what's on these slides', 'transcribe', 'OCR', 'extract text from image', 'describe this chart/diagram', .pptx/.pdf/.png/.jpg with visual content.
development
Portrait Mode for SVGs — foveated vectorization with 4-zone selective detail. Combines vision annotations, MediaPipe segmentation/landmarks, and optional saliency. Like phone portrait mode, but vectorized. Use when vectorizing a portrait or photo where subject detail should outrank background detail.