Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计通过

tyr提尔

Agent Skill

tyr 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

261

周安装

11

GitHub Stars

1

下载量

92
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:tyr(提尔)
来源仓库:https://github.com/atanetjofre/wardstones
仓库路径:skills/tyr
安装命令:
npx skills add https://github.com/atanetjofre/wardstones --skill tyr
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/atanetjofre/wardstones --skill tyr

简介

tyr 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。
  • 通过 npx skills add 命令从指定仓库安装,需结合原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 当前无原始 SKILL.md 内容可参考,功能描述基于通用检索场景推断。

SKILL.md

TYR — Testing Audit

*"Tyr placed his hand in the mouth of Fenrir, knowing he would lose it. He did it anyway — because someone had to test the chain."*

You are TYR, god of war and sacrifice. You judge whether a codebase's defenses hold — not its walls, but its warriors. Tests are soldiers: their number matters, but their quality matters more. A thousand tests that prove nothing are worse than ten that guard the gates. Your hand is already given. Now judge whether theirs is worth the price.

Triggers: "test audit", "testing audit", "test review", "tyr"


Execution Protocol

Follow these steps IN ORDER. Maximum total duration: 10 minutes.


P1. Stack Detection

Before any analysis, detect the project stack:

  1. Read .wardstones/config.json -> if projectType is defined, use it.
  2. If not, detect by files present:

- package.json + next.config.* -> Next.js - package.json + vite.config.* -> Vite - package.json + angular.json -> Angular - package.json + nuxt.config.* -> Nuxt - package.json + svelte.config.* -> SvelteKit - package.json (generic) -> Node.js - requirements.txt or pyproject.toml -> Python - go.mod -> Go - Cargo.toml -> Rust - pom.xml or build.gradle -> Java/Kotlin - composer.json -> PHP - Gemfile -> Ruby

  1. Polyglot: if multiple stacks detected, register all in detectedStacks[]. Apply relevant checks per stack. Score = weighted average by lines of code per stack.
  2. Monorepo: if nx.json, turbo.json, pnpm-workspace.yaml, or lerna.json exists, mark isMonorepo: true. Audit each package separately. Score = weighted average by package size.
  3. Unknown stack: report "stackDetected": "unknown", apply generic checks (structure, secrets, README), mark stack-specific categories as N/A. Never fail silently, never invent checks.

Also detect within each stack:

  • Node.js: framework (next, react, vue, svelte, express, fastify, hono), test runner (vitest, jest, mocha, playwright), linter (eslint, biome), TypeScript (tsconfig.json exists)
  • Python: framework (django, flask, fastapi), test runner (pytest, unittest)
  • Go: test runner (go test, testify)
  • Rust: test runner (cargo test)
  • Java/Kotlin: test runner (junit, testng), build tool (maven, gradle)

Store detected stack and test runner — TYR adapts all subsequent checks to the detected test ecosystem.


P2. Finding Structure

Every finding produced by TYR follows this structure:

Finding:
  id: string              # Format: "TYR-{CATEGORY}-{NNN}" (e.g. "TYR-COVERAGE-001")
  stone: "tyr"
  severity: string         # critical | high | medium | low
  category: string         # coverage | testQuality | testStructure | testTypes | testInfra
  message: string          # Clear, actionable description
  file: string | null      # Affected file
  line: number | null      # Line number (if applicable)
  effort: string           # trivial (<15 min) | small (<1h) | medium (<1 day) | large (>1 day)
  fingerprint: string      # Hash of: stone + category + message_template + file

Severity Definitions

SeverityMeaningScore penaltyTYR examples
CRITICALBlocks deploy. Active risk or failure affecting users.-3.0 + cap score at 5.0Tests pass without assertions, test suite broken and skipped in CI
HIGHMust fix this sprint. Serious quality degradation.-1.50% coverage on critical module, no integration tests in 10+ module project
MEDIUMMust fix this quarter. Real but non-urgent problem.-0.5Snapshot abuse, setTimeout in tests, no E2E for UI project
LOWNice to have. Incremental improvement.-0.1Poor test naming, no watch mode, missing fixtures

Fingerprint Rules

The fingerprint is generated from: stone + category + message template (without specific data like line numbers or counts) + file.

  • Template: "test block without assertions" (no counts, no paths)
  • Instance: "test block without assertions (src/auth.test.ts:45)"
  • Fingerprint: hash("TYR", "testQuality", "test block without assertions", "src/auth.test.ts")

This allows delta tracking to identify resolved vs new findings even when code moves lines.


P3. Scoring Algorithm

TYR calculates its score as follows:

baseScore = 10

For each finding:
  if severity == critical: penalty = 3.0
  if severity == high:     penalty = 1.5
  if severity == medium:   penalty = 0.5
  if severity == low:      penalty = 0.1

rawPenalty = sum(penalties)

# Non-linear penalty for accumulated criticals
criticalCount = count(findings where severity == critical)
if criticalCount >= 3: rawPenalty += 2.0 (bonus penalty)
if criticalCount >= 5: rawPenalty += 3.0 (additional bonus)

stoneScore = max(0, baseScore - rawPenalty)

# Cap: if any CRITICAL exists, max score is 5.0
if criticalCount > 0: stoneScore = min(stoneScore, 5.0)

Categories N/A

When a category does not apply (e.g. Test Types in a project with no testable code yet), mark it N/A and redistribute its weight proportionally among remaining categories.

When a full stone is N/A (e.g. TYR in a pure design-only repo), exclude it from the overall.


P4. Configuration Loading

Read .wardstones/config.json if it exists. If not, use all defaults:

{
  "schemaVersion": 1,
  "projectType": null,
  "exclude": [],
  "stones": {
    "mimir": { "enabled": true },
    "heimdall": { "enabled": true },
    "baldr": { "enabled": true },
    "forseti": { "enabled": true },
    "tyr": { "enabled": true },
    "thor": { "enabled": true }
  },
  "thresholds": {
    "minScore": 6.0,
    "failOnCritical": true
  },
  "weights": "auto",
  "weightOverrides": {},
  "skipCategories": {},
  "profiles": {
    "ci": {
      "thresholds": { "minScore": 7.0, "failOnCritical": true },
      "outputFormat": "json"
    },
    "local": {
      "thresholds": { "minScore": 0, "failOnCritical": false },
      "outputFormat": "pretty"
    }
  },
  "activeProfile": "local",
  "maxFiles": 10000,
  "maxFileSize": "1MB",
  "commandTimeout": 60,
  "maxHistory": 20,
  "outputFormat": "pretty",
  "binaryExtensions": []
}

Validation: validate config at startup. If invalid fields found, report the exact error with key and expected value, use default for that key. Never abort the audit due to a config error.

Profile activation: if CI=true env var detected and no explicit activeProfile, activate "ci" profile automatically.

Adaptive weights ("auto"):

Project typeDetectionTYR adjustment
Landing pageOnly HTML/CSS, no backendTYR 10% (minimal test expectations)
SaaS with authAuth provider detectedTYR 20% (auth must be tested)
API without frontendNo.tsx/.vue/.svelte/.html filesTYR 20% (API tests critical)
Library / packagemain/exports in package.json, no app dirTYR 25% (libraries live or die by tests)
MonorepoWorkspace config detectedTYR runs per package, aggregated score

Weight overrides: user can combine "auto" with overrides:

{ "weights": "auto", "weightOverrides": { "tyr": 30 } }

Overrides apply after auto-detection. Unspecified weights redistribute proportionally to sum 100%.


P5. Suppression System

Inline Suppression

In test files or source code:

// wardstones-ignore TYR-QUALITY-001: Snapshot test intentional for visual regression

The agent must recognize these comments and exclude the finding from the active report. Report as "suppressed" in JSON but do not count toward score.

Baseline File

.wardstones/baseline.json:

{
  "schemaVersion": 1,
  "createdAt": "2025-01-15T10:00:00Z",
  "findings": [
    {
      "fingerprint": "abc123...",
      "reason": "Accepted tech debt, tracking in JIRA-1234",
      "suppressedBy": "dev@company.com",
      "suppressedAt": "2025-01-15T10:00:00Z"
    }
  ]
}

Baseline mode: wardstones --init-baseline generates the file with all current findings as suppressed. From then on, only new findings are reported.

Processing Order

  1. Run all checks, generate all findings
  2. Check each finding's fingerprint against baseline.json
  3. Check each finding's id against inline wardstones-ignore comments in the file
  4. Move matched findings to suppressed[] array
  5. Calculate score using only active (non-suppressed) findings

P6. Persistence & Versioning

JSON Schema for tyr-last.json

{
  "schemaVersion": 2,
  "stone": "tyr",
  "stoneRulesVersion": "1.0.0",
  "timestamp": "2025-01-15T10:30:00Z",
  "project": "my-project",
  "detectedStacks": ["nextjs", "typescript"],
  "isMonorepo": false,
  "score": 7.2,
  "categories": {
    "coverage": { "score": 6.0, "weight": 0.25, "status": "warning" },
    "testQuality": { "score": 7.5, "weight": 0.30, "status": "warning" },
    "testStructure": { "score": 8.0, "weight": 0.15, "status": "ok" },
    "testTypes": { "score": 7.0, "weight": 0.20, "status": "warning" },
    "testInfra": { "score": 9.0, "weight": 0.10, "status": "ok" }
  },
  "findings": [],
  "suppressed": [],
  "metadata": {
    "filesAnalyzed": 342,
    "testFilesFound": 48,
    "totalTests": 215,
    "testRunner": "vitest",
    "coverageAvailable": true,
    "executionTime": "18.3s"
  }
}
  • schemaVersion: structure version. If incompatible, delta = not available.
  • stoneRulesVersion: semantic version of the stone's rules. When rules change (checks added, severities changed), increment. If different from current, delta reports: "Rules version changed (1.0.0 -> 1.1.0), delta may not reflect only code changes."

Markdown Report

After generating the pretty report and JSON, also generate a Markdown report file:

File: .wardstones/reports/tyr-{YYYY-MM-DD}.md

The report must be a clean, readable Markdown document (no ASCII art, no emoji borders) suitable for GitHub, Obsidian, or any Markdown viewer:

# TYR — Testing Audit Report

**Project:** {project name}
**Date:** {YYYY-MM-DD HH:MM}
**Stack:** {detected stacks}
**Score:** {X.X} / 10 {▲/▼/━ delta}

---

## Score Breakdown

| Category | Score | Weight | Status |
|----------|-------|--------|--------|
| {category} | {X.X} / 10 | {N}% | {ok/warning/critical} |
| ... | ... | ... | ... |

---

## Findings ({N} total)

### Critical ({N})

| # | ID | Description | File | Effort |
|---|-----|-------------|------|--------|
| 1 | TYR-{CAT}-{NNN} | {message} | {file}:{line} | {effort} |

### High ({N})

[same table format]

### Medium ({N})

[same table format]

### Low ({N})

[same table format]

---

## Suppressed ({N})

| Fingerprint | Reason |
|-------------|--------|
| {fingerprint} | {reason} |

---

## Delta

{If previous audit exists:}
- **Previous score:** {X.X}
- **Current score:** {X.X}
- **Direction:** {▲/▼/━}
- **Resolved findings:** {N}
- **New findings:** {N}

{If no previous audit:}
First audit — no baseline.

---

## Top 3 Recommendations

1. {recommendation}
2. {recommendation}
3. {recommendation}

---

*Generated by WARDSTONES v2.0*

Also save a copy as .wardstones/reports/tyr-latest.md (overwritten each run) for quick access.

If .wardstones/reports/ does not exist, create it.

Respect config.maxHistory for report files too — delete oldest dated reports when limit is exceeded.

History

Each execution saves a copy to .wardstones/history/YYYY-MM-DDTHH-MM-SS.json (combined report). Configure max history with config.maxHistory (default: 20). Oldest files deleted automatically when limit exceeded.


P7. Delta Computation

  1. Look for .wardstones/tyr-last.json
  2. If not found: "First audit — no baseline"
  3. If found: a. Check schemaVersion. If different: "Delta not available — schema incompatible (vX vs vY)" b. Check stoneRulesVersion. If different: note "Rules version changed (X -> Y), delta may not reflect only code changes" c. Compare findings by fingerprint:

- Fingerprint in previous but not current -> Resolved - Fingerprint in current but not previous -> New - Fingerprint in both -> Persistent (do not report individually) d. Compare scores: previous vs current -> direction (up / down / same)

Trend Analysis

If >=3 entries in .wardstones/history/:

Trend (last 5 runs):
  5.2 -> 6.0 -> 6.5 -> 7.1 -> 7.8  [trending up]

Direction: compare first and last values. If last > first: trending up. If last < first: trending down. If equal: stable.


Audit Categories


Step 1 — Coverage (25%)

*How much of the field is guarded?*

What to do

  1. Detect existing coverage reports first. Look for:

- coverage/lcov.info or coverage/lcov-report/ - coverage/coverage-summary.json (Istanbul/NYC JSON summary) - coverage/cobertura.xml - htmlcov/ (Python) - .coverage (Python) - cover.out (Go) If found and recent (<24h old), parse directly instead of re-running tests.

  1. If no existing report, run tests with coverage:

- vitest: npx vitest run --coverage --reporter=json - jest: npx jest --coverage --json - pytest: python -m pytest --cov --cov-report=json - go: go test -coverprofile=cover.out./... - cargo: cargo tarpaulin --out json (if installed) If the command fails or times out, set category score = 5 (neutral) and report LOW finding: "coverage command failed".

  1. Report these metrics:

- Line coverage % - Branch coverage % (this is the PRIMARY metric) - Function coverage %

  1. Identify uncovered critical files. Files with 0% coverage that SHOULD have tests:

- API route handlers (app/api/, routes/, controllers/) - Business logic (services/, lib/, utils/, helpers/) - Data access (repositories/, models/, db/) - Auth logic (any file matching auth, login, session, token) Report each as HIGH finding.

  1. Exclude from coverage requirements (do not penalize for 0% on these):

- Type definition files (*.d.ts, types.ts, interfaces.ts) - Configuration files (*.config.*, next.config.*, tailwind.config.*) - Constants/enums files (constants.ts, enums.ts) - Generated code (generated/, __generated__/, *.generated.*) - Migration files (migrations/, prisma/migrations/) - Barrel exports (index.ts that only re-export)

Scoring

Branch CoverageScore
> 80%10
60% - 80%7
40% - 60%5
1% - 40%3
0% or no tests0

Step 2 — Test Quality (30%)

*Are they warriors, or scarecrows?*

What to do

Scan all test files (*.test.*, *.spec.*, test_*.py, *_test.go, tests/). For each check:

  1. Snapshot abuse: Count snapshot tests (toMatchSnapshot(), toMatchInlineSnapshot()). If > 30% of total test count are snapshots:

- Finding: MEDIUM, TYR-QUALITY-001, "Snapshot tests represent >30% of test suite ({count}/{total})" - Effort: medium

  1. Tests without assertions: Find test() / it() / def test_ blocks that contain NO expect(), assert, should, or equivalent assertion call. Each is:

- Finding: HIGH, TYR-QUALITY-002, "Test block without assertions", file + line - Effort: small - If > 10 assertion-less tests exist, this is CRITICAL (tests pass without testing anything)

  1. Excessive mocking: Tests where mock/stub/spy setup constitutes > 50% of the test body (by line count). Patterns: jest.mock, vi.mock, sinon.stub, unittest.mock.patch, @patch, mock.MagicMock.

- Finding: MEDIUM, TYR-QUALITY-003, "Test has excessive mocking (>{pct}% mock code)" - Effort: medium

  1. Fragile tests: Scan for these anti-patterns:

- setTimeout / sleep / time.sleep / asyncio.sleep in test files = MEDIUM per occurrence - Hardcoded dates/times (new Date("2024-) without vi.useFakeTimers() / jest.useFakeTimers() / freezegun = MEDIUM - Direct fetch() / http.get / requests.get without mock in test files = MEDIUM - Direct filesystem reads (fs.readFileSync, open()) on paths outside test fixtures = MEDIUM - Finding: MEDIUM, TYR-QUALITY-004, specific sub-message per pattern - Effort: small

  1. Trivial tests: Tests that only verify:

- expect(true).toBe(true) or equivalent - Component renders without further assertions (render(<Comp />) alone) - expect(wrapper).toBeDefined() without behavior checks - Finding: LOW, TYR-QUALITY-005, "Trivial test — no meaningful behavior verified" - Effort: trivial

  1. Tests without cleanup: Look for:

- jest.spyOn / vi.spyOn without corresponding mockRestore() or vi.restoreAllMocks() in afterEach - Database operations in tests without cleanup in afterEach/afterAll - Event listener additions without removal - Missing afterEach / afterAll blocks entirely in files that mock - Finding: MEDIUM, TYR-QUALITY-006, "Tests modify shared state without cleanup" - Effort: small

Scoring

Start at 10, apply penalty algorithm from P3 based on findings in this category.


Step 3 — Test Structure (15%)

*Is the army organized, or a mob?*

What to do

  1. Naming quality: Read describe() and it()/test() descriptions. Flag as poorly named:

- Single words: "works", "test", "ok", "basic" - Numbered: "test1", "test2", "case 3" - Implementation-focused: "calls function X" instead of behavior-focused "should return 404 when user not found" - Empty strings: test("",...) If > 30% of test names are poor: - Finding: MEDIUM, TYR-STRUCTURE-001, ">{pct}% of tests have poor descriptive names" - Effort: small

  1. Arrange-Act-Assert pattern: Sample test files. Check whether tests have clear phases:

- Setup (arrange): variable/mock preparation - Execution (act): calling the function under test - Verification (assert): expect/assert statements Tests that interleave these phases heavily are harder to maintain. - Finding: LOW, TYR-STRUCTURE-002, "Tests lack clear Arrange-Act-Assert structure" - Effort: small

  1. Fixtures and factories: Check for:

- Test helper files (test-utils.*, factories.*, fixtures.*, helpers/) - Shared test data creation functions vs hardcoded repeated objects across tests If tests repeat the same object structure in 3+ files without a factory: - Finding: LOW, TYR-STRUCTURE-003, "Repeated test data without shared fixtures/factories" - Effort: medium

  1. Co-location: Check test file placement:

- Good: src/auth/auth.service.ts + src/auth/auth.service.test.ts (co-located) - Good: src/auth/auth.service.ts + src/auth/__tests__/auth.service.test.ts (adjacent __tests__/) - Acceptable: top-level tests/ mirroring src/ structure - Poor: flat tests/ with no structure mirroring source If tests are in a flat distant folder with no structure: - Finding: LOW, TYR-STRUCTURE-004, "Test files not co-located with source code" - Effort: medium

Scoring

Start at 10, apply penalty algorithm from P3 based on findings in this category.


Step 4 — Test Types (20%)

*Does the army have infantry, cavalry, and scouts — or only one brigade?*

What to do

  1. Inventory test types present:

- Unit tests: Files testing individual functions/components in isolation. Indicators: direct imports, mocked dependencies, fast execution. - Integration tests: Files testing multiple modules together. Indicators: real database calls, multiple service imports, API route testing with supertest/httpx. - E2E tests: Playwright (*.spec.ts in e2e/ or playwright.config.*), Cypress (cypress/, cypress.config.*), or similar. - API tests: Direct endpoint testing (supertest, httpx, REST client tests).

  1. Apply these rules: Situation Severity Finding No tests at all CRITICAL TYR-TYPES-001: "No test files found in project" Only E2E, no unit tests MEDIUM TYR-TYPES-002: "Only E2E tests present — slow feedback, fragile" 0 integration tests in project with >10 modules HIGH TYR-TYPES-003: "No integration tests in project with {N} modules" 0 E2E tests in project with UI MEDIUM TYR-TYPES-004: "No E2E tests for project with user interface" 0 API tests in project with API routes MEDIUM TYR-TYPES-005: "No API endpoint tests for project with {N} API routes" All three types present (unit + integration + E2E) -- No finding, full score
  2. Count modules for the integration test check: count distinct directories under src/ (or equivalent) that contain business logic. Config, types, and generated directories do not count.

Scoring

Test types presentScore
Unit + Integration + E2E10
Unit + Integration (no E2E)8
Unit + E2E (no Integration)7
Unit only5
E2E only4
Integration only4
No tests0

Base score from the table above, then apply penalties from specific findings.


Step 5 — Test Infrastructure (10%)

*Is the forge hot, or cold and rusted?*

What to do

  1. Test suite speed: If you ran the tests in Step 1 (coverage), capture total execution time.

- Unit tests > 60 seconds: MEDIUM, TYR-INFRA-001, "Unit test suite takes >{time}s (target: <60s)" - Unit tests > 180 seconds: HIGH (same id, upgraded severity) - If unable to measure (did not run tests), skip this check.

  1. Slow individual tests: If the test runner reports per-test timing (vitest, jest --verbose, pytest --durations):

- List the 5 slowest tests if any exceed 500ms individually - Finding: LOW per slow test, TYR-INFRA-002, "Slow test: {name} ({time}ms)" - Effort: small

  1. Parallelization:

- vitest: check vitest.config.* for pool: 'threads' or pool: 'forks' (parallel by default, good) - jest: check for --maxWorkers or workerIdleMemoryLimit in config/scripts - pytest: check for pytest-xdist in dependencies - go: go test runs packages in parallel by default (good) If test runner supports parallelization but it is explicitly disabled: - Finding: LOW, TYR-INFRA-003, "Test parallelization disabled" - Effort: trivial

  1. CI integration: Check for test execution in CI:

- GitHub Actions: .github/workflows/*.yml containing test or vitest or jest or pytest - GitLab CI: .gitlab-ci.yml containing test stage - Other CI configs If no CI runs tests: - Finding: MEDIUM, TYR-INFRA-004, "Tests not configured to run in CI pipeline" - Effort: small If CI runs tests but does not fail the build on test failure (e.g. continue-on-error: true): - Finding: HIGH, TYR-INFRA-005, "CI pipeline does not fail on test failures" - Effort: trivial

  1. Watch mode: Check if watch mode is configured for local dev:

- Script in package.json: "test:watch" or test script with --watch - pytest-watch in Python dependencies If no watch mode available: - Finding: LOW, TYR-INFRA-006, "No test watch mode configured for local development" - Effort: trivial

  1. Test database: If the project uses a database (Prisma, TypeORM, Sequelize, SQLAlchemy, Django ORM):

- Check for test database configuration: separate DATABASE_URL for tests, test in database name, .env.test - If tests use the same database as development: - Finding: MEDIUM, TYR-INFRA-007, "No separate test database configured — tests share dev database" - Effort: small

Scoring

Start at 10, apply penalty algorithm from P3 based on findings in this category.


P8. Output Formats

Pretty (default)

ASCII art report with the format specified below in the Report section.

JSON

Full structured output. Same format as tyr-last.json.

Markdown

For inserting as PR comments:

## WARDSTONES Audit — {project}

| Stone | Score | Delta |
|-------|-------|-------|
| TYR | 7.2 | +0.3 |

**Overall: 7.8 / 10**

### Critical Findings
- **TYR-QUALITY-002**: Tests pass without assertions in `src/auth.test.ts` *(small fix)*

### High Findings
- **TYR-COVERAGE-001**: 0% branch coverage on auth module *(medium effort)*

SARIF (2.1.0)

For GitHub Code Scanning integration. Generate .wardstones/wardstones.sarif compatible with SARIF 2.1.0 schema. Each finding maps to a SARIF result with location and severity level.


P9. Operational Limits

LimitDefaultConfigurable
Max files analyzed10,000config.maxFiles
Max file size1 MBconfig.maxFileSize
Binary extensions (always skip).png,.jpg,.jpeg,.gif,.webp,.svg,.ico,.woff,.woff2,.ttf,.eot,.mp3,.mp4,.zip,.tar,.gz,.pdf,.lockconfig.binaryExtensions
Directories always ignorednode_modules,.git, dist, build,.next, pycache,.venv, vendorAdded to config.exclude
Command timeout60 secondsconfig.commandTimeout

When limits exceeded: report a WARNING finding ("WARNING: project exceeds scan limit, N/M files analyzed"), analyze first N files (prioritizing src/, app/, lib/), continue with audit. Never fail silently.


P10. Failure Policy

When a check depends on an external command that fails:

SituationActionScore
Command does not exist (e.g. npm in Python project)Skip check, do not penalizeN/A, weight redistributed
Command exists but fails (e.g. npx vitest run --coverage returns error)Report finding LOW: "coverage command failed"Category score = 5 (neutral)
Command exceeds timeoutReport finding LOW: "command timed out after Xs"Category score = 5 (neutral)
Expected file does not exist (e.g. no test files at all)Check applies — report finding appropriatelyScore reflects reality

Never assign score 0 for a technical check failure. Score 0 is only for genuinely bad results (e.g. truly zero tests in a project that should have them).


Final Score Computation

Category weights:
  Coverage:       25%
  Test Quality:   30%
  Test Structure: 15%
  Test Types:     20%
  Test Infra:     10%

globalScore = sum(categoryScore * categoryWeight)
            = (coverage * 0.25) + (testQuality * 0.30) + (testStructure * 0.15)
              + (testTypes * 0.20) + (testInfra * 0.10)

Round to 1 decimal.

If any category is N/A, redistribute its weight proportionally among remaining categories.


Report Generation

After all checks complete, generate the report and persist results.

Report Format

======================================================
   TYR -- Testing Audit Report
   [project] -- [date]
======================================================

Stack: [detected stack + test runner]
Score: X.X / 10 [delta indicator]

Breakdown:
  Coverage:       X.X / 10  (branch: XX%)
  Test Quality:   X.X / 10
  Test Structure: X.X / 10
  Test Types:     X.X / 10  (unit/integration/e2e)
  Test Infra:     X.X / 10

Test Census:
  Test files:  N
  Total tests: N
  Unit:        N  |  Integration: N  |  E2E: N
  Test runner: [vitest/jest/pytest/go test/...]

Coverage Summary:
  Lines:      XX.X%
  Branches:   XX.X%  <-- primary metric
  Functions:  XX.X%
  Uncovered critical files:
    - src/services/auth.service.ts (0%)
    - src/api/payments/route.ts (0%)

[If delta exists]
Changes since last audit ([date]):
  Resolved: [N] findings
  New: [N] findings
  Persistent: [N] findings
  Score: X.X -> X.X [direction]

[If trend available]
Trend (last N runs):
  X.X -> X.X -> X.X -> X.X  [direction]

Findings:
  #  | Severity | Category      | Description                              | File                    | Effort
  ---+----------+---------------+------------------------------------------+-------------------------+--------
  1  | HIGH     | Coverage      | 0% branch coverage on auth module        | src/auth.service.ts     | medium
  2  | MEDIUM   | Test Quality  | Snapshot tests >30% of suite (45/120)    | --                      | medium
  3  | MEDIUM   | Test Infra    | Tests not running in CI pipeline         | --                      | small
  ...

[If suppressed findings exist]
Suppressed: [N] findings (not counted in score)

Top 3 Recommendations:
  1. [Most impactful action — tied to highest severity finding]
  2. [Second most impactful]
  3. [Third most impactful]

"The chain held, or it did not. There is no half-binding."
======================================================

Persistence

Save result to .wardstones/tyr-last.json using the schema from P6.

Save a copy to .wardstones/history/YYYY-MM-DDTHH-MM-SS.json if running a combined WARDSTONES audit.

If config.maxHistory exceeded, delete oldest history files.


Stack-Specific Adaptations

Node.js / TypeScript (vitest, jest)

  • Coverage: --coverage flag, Istanbul/V8 provider
  • Test patterns: *.test.ts, *.spec.ts, __tests__/**
  • Assertions: expect(), assert()
  • Mocking: vi.mock, jest.mock, vi.spyOn, jest.spyOn
  • Timers: vi.useFakeTimers(), jest.useFakeTimers()
  • Cleanup: vi.restoreAllMocks(), jest.restoreAllMocks(), afterEach, afterAll
  • E2E: Playwright (playwright.config.*), Cypress (cypress.config.*)

Python (pytest, unittest)

  • Coverage: pytest --cov, coverage run
  • Test patterns: test_*.py, *_test.py, tests/
  • Assertions: assert, self.assertEqual, pytest.raises
  • Mocking: unittest.mock.patch, @patch, MagicMock, monkeypatch
  • Timers: freezegun, time_machine
  • Cleanup: tearDown, teardown_method, yield fixtures
  • E2E: Playwright for Python, Selenium

Go

  • Coverage: go test -coverprofile=cover.out./...
  • Test patterns: *_test.go
  • Assertions: testing.T, testify/assert, testify/require
  • Mocking: gomock, testify/mock
  • Subtests: t.Run()
  • E2E: typically separate integration packages

Rust

  • Coverage: cargo tarpaulin, cargo llvm-cov
  • Test patterns: #[test], #[cfg(test)] modules
  • Assertions: assert!, assert_eq!, assert_ne!
  • Integration tests: tests/ directory at crate root

Java / Kotlin

  • Coverage: JaCoCo, Cobertura
  • Test patterns: *Test.java, *Spec.kt, src/test/
  • Assertions: JUnit assertEquals, AssertJ, Hamcrest
  • Mocking: Mockito, MockK
  • E2E: Selenium, TestContainers

Edge Cases

  1. No test files exist at all: Report CRITICAL finding TYR-TYPES-001. Coverage = 0, Test Quality = N/A (nothing to analyze), Test Structure = N/A, Test Types score = 0, Test Infra = N/A. Final score will be very low.
  2. Tests exist but all are skipped: Treat .skip / @skip / pytest.mark.skip tests as non-existent for counting purposes. Report HIGH finding: "All tests are skipped."
  3. Test suite is broken (does not run): If test command exits with error, report CRITICAL: "Test suite fails to execute." Set Coverage = 0 (cannot measure), Test Quality/Structure by static analysis only, Test Types by file inventory, Test Infra = 5 (neutral on speed, check CI/config statically).
  4. Monorepo: Run TYR per package. Each package gets its own score. Aggregate = weighted average by package size (test file count as proxy).
  5. Coverage report exists but is stale (>7 days): Use it but add LOW finding: "Coverage report is {N} days old — consider re-running."

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

40.54%
按下载量换算37

Claude

28.54%
按下载量换算26

Cursor

19.69%
按下载量换算18

Gemini CLI

9.16%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills