Skip to content
Back to skills

Doctor Check

ASecurity

Coverage gap analysis for the bashdep public API plus a bashdep::doctor audit

  • 19 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
toolsgobashapi

Works with

  • api

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add Chemaclass/bashdep --skill doctor-check --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Doctor Check?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Doctor Check
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/chemaclass-doctor-check/badge)](https://www.skillsdirectory.com/skills/chemaclass-doctor-check)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: doctor-check
description: Coverage gap analysis for the bashdep public API plus a bashdep::doctor audit
allowed-tools: Read, Bash, Grep, Glob
---

# Doctor Check

Two-part health check:

1. **Test coverage** - every public `bashdep::*` command must have tests
    for its happy path, mode flags, and failure modes.
2. **Runtime invariants** - `bashdep::doctor` itself reports lockfile vs
    filesystem inconsistencies; verify it covers every relevant directory.

## Workflow

### 1. Enumerate the Public API

```bash
grep -nE '^function bashdep::[a-z]' bashdep | grep -v '::_'
```

That list is the source of truth for what needs coverage.

### 2. Map Functions to Tests

For each public function:

```bash
grep -nE "bashdep::<name>\b" tests/unit/bashdep_test.sh
```

For each, check coverage of:
- Happy path
- `BASHDEP_DRY_RUN=true`
- `BASHDEP_SILENT=true`
- `BASHDEP_VERBOSE=true`
- `BASHDEP_FORCE=true` (when relevant)
- At least one failure mode (bad arg, missing file, IO error)

### 3. Categorize Coverage

- **Well tested** - happy path + mode flags + β‰₯1 failure mode
- **Partially tested** - happy path only
- **Not tested** - no test references the function

### 4. Identify Critical Gaps

**Priority 1:** Any public `bashdep::*` function with zero tests
**Priority 2:** Mutating commands missing `dry-run` coverage (silently
breaking the contract is the easiest regression to ship)
**Priority 3:** Failure paths (`return 1`) with no test
**Priority 4:** Snapshot drift - re-run the suite; if any snapshot
mismatch appears, decide drift vs regression

### 5. Run the Runtime Doctor

In the demo workspace (`example/`) or a scratch dir:

```bash
( cd example && bash demo.sh )
# Then, from the same dir:
source bashdep && bashdep::doctor
```

Confirm `bashdep::doctor`:
- Reports `OK` when lockfile and dir match
- Reports `missing file` when the lockfile entry has no on-disk file
- Reports `orphan file` when a file in the dir has no lockfile entry
- Honors `BASHDEP_SILENT` (errors still on stderr)

### 6. Generate Report

Output a markdown report with:
- Summary (total public functions, tested, % with mode coverage)
- Coverage table by function (βœ… happy / 🟑 partial / ❌ none)
- Critical gaps with line references in `bashdep`
- Recommended new tests with proposed function names

## Coverage Goals

- 100% of public `bashdep::*` functions have β‰₯1 test
- 100% of mutating commands have `dry-run` coverage
- β‰₯1 failure-mode test per public function
- `bashdep::doctor` exercised in the test suite for: missing file,
  orphan file, OK case

Attribution

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

Loading comments…