inspecting-skills

Discovers and indexes Python code in skills, enabling cross-skill imports. Use when importing functions from other skills or analyzing skill codebases.

16 stars

Best use case

inspecting-skills is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Discovers and indexes Python code in skills, enabling cross-skill imports. Use when importing functions from other skills or analyzing skill codebases.

Teams using inspecting-skills should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/inspecting-skills/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/inspecting-skills/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/inspecting-skills/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How inspecting-skills Compares

Feature / Agentinspecting-skillsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Discovers and indexes Python code in skills, enabling cross-skill imports. Use when importing functions from other skills or analyzing skill codebases.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Inspecting Skills

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

## Installation

```python
import sys
sys.path.insert(0, '/home/user/claude-skills')
from inspecting_skills import setup_skill_path, skill_import
```

## Quick Start

### Import a Skill

```python
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"])
```

### Enable Transparent Imports

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

### Discover Available Skills

```python
from inspecting_skills import list_importable_skills

skills = list_importable_skills()
for s in skills:
    print(f"{s['name']} -> import {s['module_name']}")
```

## Core Functions

### Discovery

| 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" |

### Indexing

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

### Importing

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

## Skill Layouts

Skills organize Python code in three patterns:

### 1. Scripts Directory
```
browsing-bluesky/
  SKILL.md
  __init__.py          # Re-exports from scripts/
  scripts/
    __init__.py
    bsky.py            # Main implementation
```

### 2. Root-Level Modules
```
remembering/
  SKILL.md
  __init__.py          # Re-exports functions
  memory.py            # Core functionality
  boot.py
  config.py
```

### 3. Simple Package
```
simple-skill/
  SKILL.md
  __init__.py          # Contains all code
```

## Generating a Registry

Create a `registry.json` for offline symbol lookup:

```python
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": [...]
#     }
#   }
# }
```

## Indexing a Single Skill

```python
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 ''}")
```

## Integration with mapping-codebases

This skill complements `mapping-codebases` which generates `_MAP.md` files:

- **mapping-codebases**: Static documentation via tree-sitter, multi-language
- **inspecting-skills**: Runtime import support, Python-focused, dynamic discovery

Use both together:
1. `mapping-codebases` for navigation and code review
2. `inspecting-skills` for actual code imports and execution

## Troubleshooting

### Import Errors

```python
# 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
```

### Path Not Found

```python
# Manually set skills root
from inspecting_skills import set_skills_root
set_skills_root("/home/user/claude-skills")
```

## API Reference

### SkillLayout

```python
@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"
```

### SkillIndex

```python
@dataclass
class SkillIndex:
    name: str              # "browsing-bluesky"
    module_name: str       # "browsing_bluesky"
    layout_type: str
    modules: list[ModuleIndex]
    exports: list[str]     # From __all__
```

### Symbol

```python
@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
```

Related Skills

metalsmith-website-skills

16
from diegosouzapw/awesome-omni-skill

Build static websites using Metalsmith's component-based architecture. Triggers on phrases like "build me a website", "create a landing page", "help me make a site". Includes JavaScript and CSS development standards.

makepad-skills

16
from diegosouzapw/awesome-omni-skill

Makepad UI development skills for Rust apps: setup, patterns, shaders, packaging, and troubleshooting.

interview-skills

16
from diegosouzapw/awesome-omni-skill

Frameworks for technical interviews and salary negotiation. Use for behavioral interview prep (STAR method), technical interview communication, offer evaluation, and compensation negotiation strategies.

Getting Started with Skills

16
from diegosouzapw/awesome-omni-skill

Skills wiki intro - mandatory workflows, search tool, brainstorming triggers

find-skills

16
from diegosouzapw/awesome-omni-skill

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

extracting-learned-skills

16
from diegosouzapw/awesome-omni-skill

Extracts reusable skills and decision-making heuristics from debugging sessions. Use after solving tricky bugs, discovering non-obvious workarounds, or finding hidden gotchas specific to a codebase. Triggers include "save this as a skill", "learn from this", or after significant debugging effort.

emrah-skills

16
from diegosouzapw/awesome-omni-skill

Expo React Native mobile app development with expo-iap in-app purchases, AdMob ads, i18n localization, ATT tracking transparency, optional OIDC authentication, onboarding flow, paywall, and NativeTabs navigation

designer-skills

16
from diegosouzapw/awesome-omni-skill

Designer subsystem patterns for LlamaFarm. Covers React 18, TanStack Query, TailwindCSS, and Radix UI.

creating-skills

16
from diegosouzapw/awesome-omni-skill

Use when creating new Claude Code skills or improving existing ones - ensures skills are discoverable, scannable, and effective through proper structure, CSO optimization, and real examples

courier-notification-skills

16
from diegosouzapw/awesome-omni-skill

Use when building notifications across email, SMS, push, in-app, Slack, Teams, or WhatsApp. Covers transactional messages (password reset, OTP, orders, billing), growth notifications (onboarding, engagement, referral), multi-channel routing, compliance (GDPR, TCPA, CAN-SPAM), and reliability patterns.

claude-code-skills

16
from diegosouzapw/awesome-omni-skill

Comprehensive reference for creating Claude Code skills with progressive disclosure, SKILL.md structure, references/ organization, frontmatter specification, and best practices for modular capability development.

backend-skills

16
from diegosouzapw/awesome-omni-skill

Master Node.js, Express, PHP, Laravel, Java, Spring Boot, API design, and database integration. Build scalable APIs and server applications.