Skip to content
ecosystem-integrity-scanner logo

Ecosystem Integrity Scanner

ecosystem-integrity-scanner

Deeply analyzes Agent Studio framework structural health: catching phantom require() references, wrong module depth paths, missing skill/agent dependencies, bloated configurations, archived references in active code, stale catalog counts, and empty tool/skill directories.

oimiragieo/agent-studio0installs43stars

SKILL.md

Full skill instructions

Ecosystem Integrity Scanner

Overview

Automated structural integrity scanner for the entire Agent Studio framework. Catches issues that silently break agent workflows: wrong require() paths that crash at runtime, phantom skills referenced in agent frontmatter that don't exist on disk, stale agent registry counts, archived references still active in production code, UTF-16 encoding that breaks parsers, and bloated agent configs.

Core principle: Framework structural issues are pre-production bugs. A phantom skill reference means an agent will fail silently. A broken require() means a hook crashes at the wrong moment. The scanner enforces zero-tolerance for these.

When to Invoke

Skill({ skill: 'ecosystem-integrity-scanner' });

Invoke proactively after:

  • Bulk framework changes (batch skill/​agent/​hook creation or archiving)
  • Refactoring module paths or directory structure
  • Running a major audit or cleanup pass
  • Suspecting phantom references or broken require() chains
  • Before finalizing any CI sanity gate

Mandatory Skills

Invoke before starting this skill:

SkillPurposeWhen
task-management-protocolTrack scan progressAlways
ripgrepFast targeted code searchWhen investigating
code-semantic-searchConcept discoveryWhen pattern hunting
context-compressorCompress large audit resultsWhen output is large
verification-before-completionGate completion on zero errorsBefore marking done
memory-searchCheck prior audit patternsAt start

Iron Laws

  1. Always run from project root. validate-ecosystem-integrity.cjs resolves all paths relative to process.cwd(). Running from a subdirectory corrupts all path resolution. Never invoke from a non-root directory.

  2. Never ignore PHANTOM_REQUIRE errors. A [PHANTOM_REQUIRE] error means a hook or script will throw MODULE_NOT_FOUND at runtime. These always represent real breakage — no false positives once the scanner is properly calibrated.

  3. Never mark scan complete while errors > 0. Warnings are advisory; errors are blocking. Report path and severity but do not call the pipeline done until errors reach zero or are explicitly accepted as known exceptions with owner annotation.

  4. Always route HIGH errors to specialist agents. Phantom skills → qa agent. Broken require() → developer agent. Archive refs in production → developer. Never attempt to remediate complex structural failures inline without delegation.

  5. Always save the audit report before completing. Write the categorized findings to .claude/​context/​reports/​qa/​ecosystem-integrity-report-{ISO-date}.md before calling TaskUpdate(completed). Evidence must persist across context resets.

Anti-Patterns

Anti-PatternRiskCorrect Approach
Treating [STALE_CATALOG] as informational noiseRegistry drifts from reality; agents get wrong countsAlways update agent-registry.json when agent files change
Skipping scan after bulk framework batch opsBatch ops most commonly create phantom refsRun scan as the FINAL step of every batch operation
Manually patching require() paths without re-scanningOne fix may mask three new breaksAlways re-run full scan after patching paths
Running scanner against _archive/ subtreesArchive content has intentionally broken refs; false positivesScanner skip rules handle this; trust the skip list
Adding to DYNAMIC_SCRIPT_GENERATORS without reviewAccidentally suppressing real phantom detectionsOnly add files that provably generate child scripts

Step 1: Run the Integrity Audit Engine

node scripts/​validation/​validate-ecosystem-integrity.cjs

The script performs six targeted checks:

  1. [PHANTOM_REQUIRE] — Broken require() / import paths that resolve to non-existent files (after trying .js, .cjs, .mjs, .json extensions).
  2. [PHANTOM_SKILL] — Skills listed in agent frontmatter skills: arrays that have no corresponding .claude/​skills/​{name}/ directory.
  3. [EMPTY_DIR] — Empty directories in .claude/​tools/ or .claude/​skills/ that indicate abandoned scaffolding creating registry footprinting issues.
  4. [ENCODING] — Files with UTF-16 BOM (0xFEFF/0xFFFE) that break JSON/​MD parsers silently.
  5. [ARCHIVED_REF] — Production .claude/ code that still references _archive/ or .claude/​archive/ paths — active code pointing at dead modules.
  6. [STALE_CATALOG] — agent-registry.json entry count differs from actual agent .md file count on disk (drift between manifest and reality).

Step 2: Categorize and Report

Parse outputs into a structured report at .claude/​context/​reports/​qa/​ecosystem-integrity-report-{ISO-date}.md:

# Ecosystem Integrity Report

<!-- Agent: qa | Task: #{id} | Session: {date} -->

**Date:** YYYY-MM-DD
**Overall Status:** PASS / FAIL
**Errors:** N | **Warnings:** N

## HIGH — Runtime Blocking (must fix before deployment)

- `[PHANTOM_REQUIRE]` — Module resolution failures that crash hooks/​scripts
- `[PHANTOM_SKILL]` — Missing skills that break agent workflows silently

## MEDIUM — Structural Integrity (fix in current sprint)

- `[ARCHIVED_REF]` — Active code pointing at archived/​dead modules
- `[STALE_CATALOG]` — Registry count mismatch with actual agent files

## LOW — Housekeeping (fix in next maintenance window)

- `[EMPTY_DIR]` — Ghost directories creating registry noise
- `[ENCODING]` — UTF-16 files that may break parsers

Step 3: Trigger Remediations

Delegate fixes to the correct specialist:

Error TypeSpawn AgentTask Description
[PHANTOM_REQUIRE]developerFix broken require() path in {file}
[PHANTOM_SKILL]qaRemove or create missing skill {name}
[ARCHIVED_REF]developerReplace archive reference in {file}
[STALE_CATALOG]developerRegenerate agent-registry.json
[EMPTY_DIR]developerRemove empty directory {path}
[ENCODING]developerRe-encode {file} as UTF-8

After fixes, re-run the scanner and verify errors reach zero before completion.

Memory Protocol (MANDATORY)

Before starting:

cat .claude/​context/​memory/​learnings.md
cat .claude/​context/​memory/​issues.md

Review prior audit patterns and known suppressed false positives.

After completing:

  • Audit pattern → .claude/​context/​memory/​learnings.md
  • New false-positive suppression rule → .claude/​context/​memory/​decisions.md
  • Unresolved error requiring owner → .claude/​context/​memory/​issues.md

Assume interruption: If the audit report isn't saved to disk, it didn't happen.

More skills from oimiragieo

cloud-devops-expert logo
oimiragieo/agent-studio

cloud-devops-expert

Cloud and DevOps expert including AWS, GCP, Azure, and Terraform

43 0
View
xlsx logo
oimiragieo/agent-studio

xlsx

Spreadsheet toolkit (.xlsx/.csv). Create/edit with formulas/formatting, analyze data, visualization, recalculate formulas, for spreadsheet processing and analysis.

43 0
View
project-analyzer logo
oimiragieo/agent-studio

project-analyzer

Automated brownfield codebase analysis with weighted keyword scoring, three-stream analysis, and design pattern recognition. Detects project type, frameworks, dependencies, architecture patterns, and generates comprehensive project profile.

43 0
View
readme logo
oimiragieo/agent-studio

readme

Use when creating, updating, or generating README and documentation files for projects and libraries

43 0
View
scientific-writing logo
oimiragieo/agent-studio

scientific-writing

Core skill for the deep research and writing tool. Write scientific manuscripts in full paragraphs (never bullet points). Use two-stage process with (1) section outlines with key points using research-lookup then (2) convert to flowing prose. IMRAD structure, citations (APA/AMA/Vancouver), figure...

43 0
View
android-expert logo
oimiragieo/agent-studio

android-expert

Comprehensive Android development expert covering Jetpack Compose, Kotlin coroutines/Flow, Architecture Components, Hilt DI, Navigation, testing, performance, Material Design 3, and modern Android patterns (MVI, Clean Architecture).

43 0
View
biorxiv-database logo
oimiragieo/agent-studio

biorxiv-database

Efficient database search tool for bioRxiv preprint server. Use this skill when searching for life sciences preprints by keywords, authors, date ranges, or categories, retrieving paper metadata, downloading PDFs, or conducting literature reviews.

43 0
View
omega-gemini-cli logo
oimiragieo/agent-studio

omega-gemini-cli

Use when the user wants to use Google Gemini for analysis, large files or codebases, sandbox execution, or brainstorming. Uses headless Gemini CLI scripts (no MCP). Triggers on "use Gemini", "analyze with Gemini", "large file", "sandbox", "brainstorm with Gemini".

43 0
View
gtars logo
oimiragieo/agent-studio

gtars

High-performance toolkit for genomic interval analysis in Rust with Python bindings. Use when working with genomic regions, BED files, coverage tracks, overlap detection, tokenization for ML models, or fragment analysis in computational genomics and machine learning applications.

43 0
View
service-class-conventions logo
oimiragieo/agent-studio

service-class-conventions

Defines the structure and implementation of service classes, enforcing the use of interfaces, ServiceImpl classes, DTOs for data transfer, and transactional management.

43 0
View
diffdock logo
oimiragieo/agent-studio

diffdock

Diffusion-based molecular docking. Predict protein-ligand binding poses from PDB/SMILES, confidence scores, virtual screening, for structure-based drug design. Not for affinity prediction.

43 0
View
skill-discovery logo
oimiragieo/agent-studio

skill-discovery

How agents discover and use skills. Use to understand skill invocation protocol.

43 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View