Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Specalign

ASecurity

Align spec files with implementation. Detects drift between spec and code, surfaces discrepancies, user decides whether to update spec or code. Use when both a spec file and its implementation are in context.

207 stars
0 votes
0 copies
3 views
Added 9/4/2026
testinggo

Security Analysis

A100/100

Scanned 9/4/2026

Install to Claude Code

$npx -y skills add NeverSight/skills_feed --skill specalign --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Specalign?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Specalign
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/neversight-specalign/badge)](https://www.skillsdirectory.com/skills/neversight-specalign)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: specalign
description: Align spec files with implementation. Detects drift between spec and code, surfaces discrepancies, user decides whether to update spec or code. Use when both a spec file and its implementation are in context.
---

# Spec Alignment

## Principles (Always Active)

These apply whenever a spec file and its corresponding implementation are both in context:

### Spec and Code Must Agree

- A spec describes intended behavior; code implements it. When they disagree, one is wrong.
- Never silently tolerate drift - surface it immediately when noticed.
- The user decides which is the source of truth for each discrepancy. Do not assume.

### Drift Categories

- **Type drift**: spec defines fields/types that don't match the implementation
- **Behavior drift**: spec describes logic the code doesn't follow
- **Missing implementation**: spec defines something with no corresponding code
- **Missing spec**: code implements behavior not described in the spec
- **Constraint drift**: spec states invariants the code doesn't enforce
- **Error handling drift**: spec defines error cases the code doesn't handle (or vice versa)

### Mutation Policy

- Do not edit spec files unless the user explicitly chooses "update spec" for a discrepancy.
- Do not change implementation logic unless the user explicitly chooses "update code".
- When updating code, run lint/typecheck after changes.
- When updating spec, preserve formatting and structure of unrelated sections.

### Bidirectional Awareness

When reading code, check if a spec exists and note divergences.
When reading a spec, check if the implementation matches and note divergences.
This awareness should be passive - flag drift in your responses without interrupting the user's primary task, unless the drift is directly relevant.

## Workflow (When Explicitly Aligning)

### Step 1: Locate the Spec

A spec file is required. Search for:
- `*.spec.md`, `*-spec.md`, `SPEC.md`
- `spec/*.md`, `docs/*.spec.md`

If multiple specs exist, ask which to align. If none exist, stop - this workflow requires an existing spec.

Read the spec file completely.

### Step 2: Map Spec to Code

For each spec section, identify the corresponding implementation:

| Spec Section | Source File(s) | Status |
|---|---|---|
| `## Types` | `src/types.ts:10-40` | aligned / drifted / missing-impl / missing-spec |

Read each mapped source file before assessing.

### Step 3: Present Discrepancies

For each discrepancy:

```
### DRIFT-01: <short description>

**Spec says** (spec-file.md:L42):
> <quoted spec text>

**Code does** (src/module.ts:L87):
> <summarized code behavior>

**Impact**: <what breaks or is inconsistent>
```

Number with stable IDs (`DRIFT-NN`). Batch related discrepancies that share a root cause.

### Step 4: User Decision

For each discrepancy, ask:

- **Update spec** - the code is correct, update the spec to match
- **Update code** - the spec is correct, update the code to match
- **Skip** - defer this discrepancy

### Step 5: Apply Changes

**Spec updates:**
- Edit the spec file with corrected text
- Preserve formatting and structure of unrelated sections

**Code updates:**
- Fix the implementation to match the spec
- Run lint/typecheck after changes
- If non-trivial, outline the change and confirm before editing
- If unit tests exist for the affected code, run them
- If unit tests don't exist and the spec defines testable behavior, flag it

### Step 6: Summary

```
## Spec Alignment: <file>

**Discrepancies found**: N
**Resolved**: X (spec: A, code: B, skipped: C)

### Remaining
- DRIFT-04: <description> (skipped)
```

Attribution

NeverSightNeverSight
View sourceMore from NeverSight →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Screen Reader Testing

Practical guide to testing web applications with screen readers for comprehensive accessibility validation.

393431 votes

Python Testing

使用pytest、TDD方法、夹具、模拟、参数化和覆盖率要求的Python测试策略。

2456590 votes

Tdd Workflow

在编写新功能、修复错误或重构代码时使用此技能。强制执行测试驱动开发,包含单元测试、集成测试和端到端测试,覆盖率超过80%。

2456590 votes

Springboot Tdd

使用JUnit 5、Mockito、MockMvc、Testcontainers和JaCoCo进行Spring Boot的测试驱动开发。适用于添加功能、修复错误或重构时。

2456590 votes

Eval Harness

克劳德代码会话的正式评估框架,实施评估驱动开发(EDD)原则

2456590 votes
View all in testing →