add-analysis-pass
Checklist and guide for adding a new analysis pass to the trait-based modular pipeline
Skill by robertolupi
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/robertolupi-add-analysis-pass
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/add-analysis-pass
What's inside
- Skill name
add-analysis-pass- Description
- Checklist and guide for adding a new analysis pass to the trait-based modular pipeline
- License
- AGPL-3.0
- Instructions
- 431 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Adding a New Analysis Pass
The analysis pipeline lives in `src-tauri/src/analysis/` and offers **two pass shapes**. Pick the right one before writing any code:
| Trait | When to use |
|-------|-------------|
| **`AnalysisPass`** | Per-track compute dominates (inference, DSP, API calls). The orchestrator drives the job loop, progress events, pause/resume, and metrics automatically. |
| **`BatchAnalysisPass`** | Either (a) the algorithm requires all data at once (clustering, nearest-neighbour indexing), or (b) the pass is I/O-bound and per-track SQLite round-trips are the bottleneck. You own the read-compute-write loop; the orchestrator calls `execute()` once. |
---
## Current pass priorities
> **Important:** Priorities do **not** determine the pipeline execution order. The execution order is the explicit call sequence in `PipelineManager::run()` in `analysis/mod.rs`. Priorities only control backfill ordering and the `reset_pass` tooling.
| Pass | Priority | Trait | File |
|------|----------|-------|------|
| `audio_analysis` | 10 | `AnalysisPass` | `analysis/audio.rs` |
| `sax` | 12 | `BatchAnalysisPass` | `analysis/sax.rs` |
| `sax_alignment` | 13 | `AnalysisPass` | `analysis/sax_alignment.rs` |
| `boundary_refine` | 14 | `AnalysisPass` | `analysis/boundary_refine.rs` |
| `bpm_correction` | 15 | `AnalysisPass` | `analysis/bpm_correction.rs` |
| `clap` | 20 | `AnalysisPass` | `analysis/clap.rs` |
| `essentia` | 30 | `AnalysisPass` | `analysis/essentia.rs` |
| `qwen` | 50 | `AnalysisPass` | `analysis/qwen.rs` |
| `bpm_refinement` | 55 | `AnalysisPass` | `analysis/bpm_refinement.rs` |
| `structure_cluster` | 55 | `BatchAnalysisPass` | `analysis/structure_cluster.rs` |
| `description_embed` | 60 | `AnalysisPass` | `analysis/description_embed.rs` |
Pick a priority that places your pass at the correct logical point relative to its dependencies. After choosing a priority, **also** add your pass call at the right place in `PipelineManager::run()` — that is what actually sets execution order.
---
## Adding a per-track pass (`AnalysisPass`)
### 1. DB Migration
Add columns to the `tracks` table or create new secondary tables in a new migration file:
```
src-tauri/migrations/NN_your_pass.sql
```
Register it in `src-tauri/src/database.rs`:
```rust
M::up(include_str!("../migrations/NN_your_pass.sql")),
```
### 2. Create the Pass Submodule
Create a new file `src-tauri/src/analysis/your_pass.rs`.
1. Define a struct for your pass jobs and implement the `PassJob` trait:
```rust
pub struct YourJob {
pub pass_id: i64,
pub track_id: i64,
// Add other fields you need spooled upfront
}
impl super::PassJob for YourJob {
fn pass_id(&self) -> i64 { self.pass_id }
fn track_id(&self) -> i64 { self.track_id }
}
```
2. Define a struct for your pass and implement the `AnalysisPass` trait:
```rust
use crate::database::pass_status;
use crate::scanner::sidecar::pass_version;
use rusqlite::Connection;
pub struct YourPass;
impl super::AnalysisPass for YourPass {
type Job = YourJob;
type Output = YourResultType;
fn name(&self) -> &'static str {
"your_pass_name"
}
fn priority(&self) -> i32 {
60 // Select appropriate priority
}
fn version(&self) -> u32 {
pass_version::YOUR_PASS // Add constant in scanner/sidecar.rs
}
fn dependencies(&self) -> &'static [&'static str] {
&["clap"] // Declare upstream dependency pass names
}
fn owned_columns(&self) -> &'static [&'static str] {
&["your_column_name"] // Columns to null out automatically on reset
}
fn owned_tables(&self) -> &'static [&'static str] {
&[] // Secondary table rows to delete on reset
}
fn custom_reset(&self, conn: &Connection) -> Result<(), String> {
// Optional custom reset hook
Ok(())
}
fn load_jobs(&self, conn: &Connection) -> Result<Vec<Self::Job>, String> {
// Spool all pending jobs upfront in a single clean query!
let mut stmt = conn.prepare(
"SELECT tp.id, tp.track_id FROM track_passes tp
WHERE tp.status = ?1 AND tp.pass_name = 'your_pass_name'
ORDER BY tp.id ASC",
).map_err(|e| e.to_string())?;
let rows = stmt.query_map([pass_status::PENDING], |row| {
Ok(YourJob {
pass_id: row.get(0)?,
track_id: row.get(1)?,
})
})From robertolupi/deep-cuts, AGPL-3.0.
More from robertolupi/deep-cuts
- 0.534score
how-to-experiment
robertolupi
Experimental protocol for Deep Cuts research, prototypes, model evaluations, threshold tuning, ablations, metric comparisons, and claims about accuracy or…
SkillCFreshness: C★ 7Claude Code +9 - 0.534score
write-blog-post
robertolupi
Draft, structure, and finalize a Deep Cuts blog-series post so it conforms to the post template, house voice, and cross-post link rules.
SkillCFreshness: C★ 7Claude Code +9 - 0.534score
ui-debug
robertolupi
Inspect, debug, and compare the Deep Cuts UI using an available browser tool.
SkillCFreshness: C★ 7Claude Code +9 - 0.531score
dev-guidelines
robertolupi
Guidelines to prevent development false starts, environment mismatches, and incorrect commands in the deep-cuts monorepo
SkillCFreshness: C★ 7Claude Code +9 - 0.531score
add-tauri-sidecar
robertolupi
How to bundle an external binary and its dylib dependencies with the Tauri app, patch rpaths, sign everything, and resolve the path at runtime
SkillCFreshness: C★ 7Claude Code +9 - 0.531score
ui-design
robertolupi
Guidelines for the Sonic Glitch design system, theme variables, and multi-theme readability (dark, light, high-contrast)
SkillCFreshness: C★ 7Claude Code +9 - 0.531score
git-commits
robertolupi
Rules for writing commit messages in the deep-cuts repository — subject line format, body content, scope naming, and what to omit
SkillCFreshness: C★ 7Claude Code +9 - 0.531score
release-build
robertolupi
End-to-end checklist for building a signed macOS release — bump manifest min_app_version, verify sidecars, build, and inspect the .app
SkillCFreshness: C★ 7Claude Code +9 - 0.528score
add-ipc-command
robertolupi
Pattern for adding a new Tauri IPC command (request/response or push event) in the deep-cuts monorepo
SkillCFreshness: C★ 7Claude Code +9 - 0.528score
bump-dev-version
robertolupi
Bump the app version in Cargo.toml after a release to start the next dev cycle
SkillCFreshness: C★ 7Claude Code +9 - 0.528score
db-migration
robertolupi
Safe pattern for adding SQLite schema migrations in the deep-cuts Rust/rusqlite_migration stack
SkillCFreshness: C★ 7Claude Code +9 - 0.528score
query-db
robertolupi
How to locate and query the deep-cuts production SQLite database
SkillCFreshness: C★ 7Claude Code +9
Signals
- Stars
- 7
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Jun 8, 2026 (4 months ago)
- Last release
- Jun 8, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- AGPL-3.0
- Repository
- github.com/robertolupi/deep-cuts
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from robertolupi
- 0.534score
write-blog-post
robertolupi
Draft, structure, and finalize a Deep Cuts blog-series post so it conforms to the post template, house voice, and cross-post link rules.
SkillCFreshness: C★ 7Claude Code +9 - 0.534score
ui-debug
robertolupi
Inspect, debug, and compare the Deep Cuts UI using an available browser tool.
SkillCFreshness: C★ 7Claude Code +9 - 0.534score
how-to-experiment
robertolupi
Experimental protocol for Deep Cuts research, prototypes, model evaluations, threshold tuning, ablations, metric comparisons, and claims about accuracy or…
SkillCFreshness: C★ 7Claude Code +9 - 0.531score
release-build
robertolupi
End-to-end checklist for building a signed macOS release — bump manifest min_app_version, verify sidecars, build, and inspect the .app
SkillCFreshness: C★ 7Claude Code +9 - 0.531score
dev-guidelines
robertolupi
Guidelines to prevent development false starts, environment mismatches, and incorrect commands in the deep-cuts monorepo
SkillCFreshness: C★ 7Claude Code +9 - 0.531score
git-commits
robertolupi
Rules for writing commit messages in the deep-cuts repository — subject line format, body content, scope naming, and what to omit
SkillCFreshness: C★ 7Claude Code +9
Cite this page
add-analysis-pass skill. Agent Mart. https://agentmart.dev/skills/robertolupi-add-analysis-pass (last updated 2026-10-24)