All skills
simota avatar

/tome

@35ffd55
by shingo imotasimota/agent-skills85 stars
15

Converting technical knowledge into durable learning documents and publishable articles. Use for diff-based teaching, decision records, onboarding, note/Zenn/Qiita/dev.to posts, article series, retrospectives, and cross-platform repurposing.

Use this Skill: https://skilld.dev/gh/simota/agent-skills/tome

This session only. Nothing lands on disk.

referencepatterns.md

≈1.8k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Analysis Patterns

Purpose: Detailed analysis patterns and knowledge extraction techniques for different change types. Read when: Selecting an analysis approach during the ANALYZE phase.


Pattern Catalog

Pattern Target Output
Refactoring Analysis Refactoring changes Design improvement learning points
Bug Fix Archaeology Bug fixes Root cause and prevention knowledge
Feature Addition New feature additions Architecture decisions and integration points
Dependency Change Library/dependency changes Trade-off analysis and migration knowledge
Performance Optimization Optimization changes Measurement → hypothesis → improvement flow
Security Hardening Security fixes Threat model and defense patterns

Pattern 1: Refactoring Analysis

Extract design principles from refactoring changes.

Signals

  • File split/merge → separation of concerns / cohesion decisions
  • Naming changes → domain model revision
  • Function extraction → DRY principle / reusability intent
  • Type changes → type safety strengthening
  • Test additions → quality assurance policy

Framework

REFACTORING_ANALYSIS:
  before:
    code_smell: "[Code smell present before change]"
    symptoms: "[Problem symptoms: hard to read, hard to change, etc.]"
  change:
    technique: "[Refactoring technique applied]"
    scope: "[Impact scope]"
  after:
    improvement: "[Quality attributes improved]"
    principle: "[Underlying design principle]"
  teaching:
    - "Signs that this refactoring should be applied"
    - "Cases where it should NOT be applied"
    - "Related refactoring techniques"

Pattern 2: Bug Fix Archaeology

Extract root cause analysis and prevention knowledge from bug fixes.

Signals

  • Conditional branch additions/fixes → edge case oversight
  • Null/undefined checks → lack of type safety
  • Race condition fixes → insufficient concurrency consideration
  • Input validation additions → trust boundary awareness gaps

Framework

BUGFIX_ANALYSIS:
  bug:
    symptom: "[Problem observed by user]"
    root_cause: "[Root cause]"
    category: "[Classification: logic/race/null/boundary/state]"
  fix:
    approach: "[Fix approach]"
    alternative: "[Alternative fixes considered]"
  prevention:
    pattern: "[Prevention pattern for the future]"
    test: "[Tests added]"
    checklist: "[Review checklist items]"

Pattern 3: Feature Addition

Extract design decisions from new feature additions.

Signals

  • New file creation → module design decisions
  • API additions → interface design
  • Test additions → test strategy
  • Config additions → flexibility vs simplicity balance

Framework

FEATURE_ANALYSIS:
  feature:
    purpose: "[Feature purpose]"
    user_story: "[User story]"
  architecture:
    placement: "[Where the feature was placed]"
    rationale: "[Reason for placement]"
    alternatives: "[Other placements considered]"
  integration:
    touchpoints: "[Integration points with existing code]"
    contracts: "[Interfaces defined]"
  extensibility:
    design_for_change: "[Design anticipating future changes]"
    yagni_notes: "[What was deliberately NOT built]"

Pattern 4: Dependency Change

Extract trade-off decisions from library/dependency changes.

Signals

  • package.json / requirements.txt changes → dependency add/remove/update
  • Import statement changes → API migration
  • Config file changes → new configuration system

Framework

DEPENDENCY_ANALYSIS:
  change:
    type: "[add/remove/upgrade/downgrade/replace]"
    from: "[Pre-change dependency]"
    to: "[Post-change dependency]"
  rationale:
    why_change: "[Reason for change]"
    evaluation: "[Evaluation criteria: performance/security/maintainability/license]"
  tradeoffs:
    gained: "[What was gained]"
    lost: "[What was lost]"
    risks: "[Risks introduced]"
  migration:
    breaking_changes: "[Breaking changes present?]"
    migration_steps: "[Migration steps]"

Pattern 5: Performance Optimization

Extract optimization techniques from performance improvement changes.

Framework

PERFORMANCE_ANALYSIS:
  problem:
    metric: "[Metric to improve]"
    baseline: "[Pre-improvement value]"
    target: "[Target value]"
  approach:
    technique: "[Optimization technique applied]"
    rationale: "[Why this technique was chosen]"
  result:
    achieved: "[Achieved value]"
    side_effects: "[Side effects: readability decrease, etc.]"
  teaching:
    when_to_apply: "[Scenarios where this optimization is effective]"
    when_not_to_apply: "[Scenarios where it would be over-optimization]"
    measurement: "[How to measure effectiveness]"

Pattern 6: Security Hardening

Extract defense patterns from security-related changes.

Framework

SECURITY_ANALYSIS:
  vulnerability:
    type: "[Vulnerability type (OWASP classification etc.)]"
    severity: "[Severity]"
    vector: "[Attack vector]"
  fix:
    approach: "[Fix approach]"
    defense_in_depth: "[Defense-in-depth considerations]"
  teaching:
    threat_model: "[Threat model]"
    secure_pattern: "[Secure pattern]"
    insecure_pattern: "[Insecure pattern (no specific attack code)]"
    checklist: "[Security review checklist]"

Combining Patterns

When a change matches multiple patterns, select one primary pattern (based on main intent) and add secondary patterns as supplements. Connect them via Learning Points that explain how the patterns interact.


AI-Assisted Diff Explanation (2026 baseline)

Treat AI assistants as a drafting tool, not the source of truth. Always read the actual diff first, then use the assistant to surface missed angles. As of 2026:

  • GitHub Copilot Chat on PRs now includes comments, file changes, commits, and reviews as context, and can be invoked directly from a diff to walk through changes. Useful for first-pass extraction of intent before applying the 5W1H+WhyNot framework. [Source: github.blog/changelog 2026-04-23 — Copilot Chat improvements for pull requests]
  • Copilot's March 2026 agentic code-review rewrite moved from shallow line-by-line analysis to tool-calling that reads related files and traces cross-file dependencies. Pair the agent's findings with Tome's Why Not section to capture rejected alternatives the agent will not infer. [Source: github.blog/changelog 2026-03 — agentic code review]
  • Adoption vs trust gap. Stack Overflow's 2025 Developer Survey reports 84% of developers use or plan to use AI tools, but only 29% trust them, and 66% cite "almost-right-but-not-quite" output as the biggest frustration. Tome's [Inference: evidence] labelling is the explicit hedge for this gap — never copy AI-generated rationale unverified. [Source: stackoverflow.blog 2025-12-29 — 2025 Developer Survey; survey.stackoverflow.co/2025/ai]
  • Workflow guardrail. When AI drafts a learning doc, run the Tome Quality Scorecard against it before delivery — unverified AI claims default to C on the Fact/Inference Ratio axis until they are either cited or marked as inference.

Source: SKILL.md on GitHub

No alerts13d4 checks · Risk SAFE
  • Gen Agent Trust Hub13d

    The 'tome' skill is a technical documentation and article authoring tool designed to convert git changes and raw source material into structured learning assets. It incorporates robust safety standards, such as a strict 'Documents only' policy and mandatory masking of sensitive information like credentials and client details. While the skill processes external data, it includes explicit mechanisms to prevent the execution of untrusted instructions, ensuring a secure environment for technical writing.

  • Socket13d

    No alerts

  • Snyk13d

    Risk: LOW · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 35ffd55. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 2 weeks ago

README badge

README badge for simota/agent-skills/tome