home / skills / plurigrid / asi / localsend-analysis

localsend-analysis skill

/skills/localsend-analysis

This skill analyzes LocalSend repos using tree-sitter tags, GitHub GraphQL contributor snapshots, and protocol safety notes to improve reliability.

npx playbooks add skill plurigrid/asi --skill localsend-analysis

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.3 KB
---
name: localsend-analysis
description: Analyze LocalSend repos with tree-sitter tags, gh GraphQL contributor snapshots, and protocol safety notes.
version: 1.0.0
---


# Localsend Analysis

## Quick Start

[Provide ONE minimal working example - the most common use case]

```typescript
// Keep this concise - show essential code only
// Move detailed examples to references/ for Level 3 loading
```

## Core Principles

- Principle 1: [Key concept]
- Principle 2: [Key concept]
- Principle 3: [Key concept]

## Common Patterns

### [Most Frequent Pattern]

[Brief description - keep under 100 words]

## Reference Files

For detailed documentation, see:
- [references/](references/) - Add detailed guides here

## Notes

- Important note 1
- Important note 2

<!--
PROGRESSIVE DISCLOSURE GUIDELINES:
- Keep this file ~50 lines total (max ~150 lines)
- Use 1-2 code blocks only (recommend 1)
- Keep description <200 chars for Level 1 efficiency
- Move detailed docs to references/ for Level 3 loading
- This is Level 2 - quick reference ONLY, not a manual

LLM WORKFLOW (when editing this file):
1. Write/edit SKILL.md
2. Format (if formatter available)
3. Run: claude-skills-cli validate <path>
4. If multi-line description warning: run claude-skills-cli doctor <path>
5. Validate again to confirm
-->



## Scientific Skill Interleaving

This skill connects to the K-Dense-AI/claude-scientific-skills ecosystem:

### Eda
- **exploratory-data-analysis** [○] via bicomodule

### Bibliography References

- `general`: 734 citations in bib.duckdb



## SDF Interleaving

This skill connects to **Software Design for Flexibility** (Hanson & Sussman, 2021):

### Primary Chapter: 4. Pattern Matching

**Concepts**: unification, match, segment variables, pattern

### GF(3) Balanced Triad

```
localsend-analysis (○) + SDF.Ch4 (+) + [balancer] (−) = 0
```

**Skill Trit**: 0 (ERGODIC - coordination)


### Connection Pattern

Pattern matching extracts structure. This skill recognizes and transforms patterns.
## Cat# Integration

This skill maps to **Cat# = Comod(P)** as a bicomodule in the equipment structure:

```
Trit: 0 (ERGODIC)
Home: Prof
Poly Op: ⊗
Kan Role: Adj
Color: #26D826
```

### GF(3) Naturality

The skill participates in triads satisfying:
```
(-1) + (0) + (+1) ≡ 0 (mod 3)
```

This ensures compositional coherence in the Cat# equipment structure.

Overview

This skill analyzes LocalSend repositories to surface structural code patterns, contributor activity snapshots, and protocol safety observations. It combines tree-sitter parsing for precise AST/tag extraction, GitHub GraphQL snapshots for contributor and timeline metadata, and focused checks for protocol safety and compatibility. The output is a compact, actionable report aimed at maintainers and integrators.

How this skill works

The tool walks the repo tree and uses tree-sitter grammars to tag functions, types, and message-handling code paths. It queries GitHub GraphQL to produce contributor snapshots (commit counts, recent authors, timezone-aware activity windows) and correlates that with code churn. It then applies protocol-safety heuristics to identify risky message formats, versioning gaps, and ambiguous upgrade points.

When to use it

  • Before a protocol change or migration to identify fragile handlers and ambiguous message formats
  • When auditing contributor activity to understand bus-factor risks and recent code ownership
  • During release planning to find code paths with high churn that need more tests
  • For onboarding new maintainers who need a compact map of repository structure and protocol surfaces
  • When integrating LocalSend with other systems to check protocol compatibility and safety

Best practices

  • Run the analysis from a clean checkout and include all submodules to ensure complete AST tagging
  • Keep tree-sitter grammars up to date for the languages in the repo to avoid false negatives
  • Use short, timestamped GraphQL snapshots for reproducible contributor reports
  • Treat protocol-safety findings as prioritized issues: add tests, document expected message shapes, and version gates
  • Combine this analysis with targeted fuzzing or integration tests for high-risk message handlers

Example use cases

  • Audit a LocalSend fork before proposing protocol changes to identify all endpoints that need version checks
  • Generate a weekly contributor snapshot to track new authors and hotspots for code review allocation
  • Map message parsing functions via tree-sitter to create focused unit test targets for fragile paths
  • Produce a protocol-safety checklist for integrators implementing clients or bridges
  • Support release notes by listing areas of high churn and linking them to contributor snapshots

FAQ

Which languages does tree-sitter need to support?

Provide grammars for the languages present in the repository; common choices are Rust, Kotlin, Java, and Python depending on the LocalSend variant.

How are contributor snapshots stored?

Snapshots are generated from GitHub GraphQL queries with timestamps and minimal metadata (author, commits, recent files touched) to keep them compact and reproducible.

What constitutes a protocol-safety warning?

Warnings include unversioned message formats, missing validation on parsed fields, ambiguous default behaviors, and upgrade paths without explicit compatibility checks.