Skip to content
Agentmart
Submit a tool

shell-script

Create or modify production-grade shell scripts with automatic BATS test coverage and a bounded verification loop.

Skill by twistingmercury

IndexedMIT
Write a review

Chalk Labs

Need help deploying shell-script?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/twistingmercury-shell-script

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Create or modify production-grade shell scripts with automatic BATS test coverage and a bounded verification loop. Use when implementing, refactoring, or fixing shell scripts that should be delivered with executable tests.

Use cases: testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/shell-script

What's inside

Skill name
shell-script
Description
Create or modify production-grade shell scripts with automatic BATS test coverage and a bounded verification loop. Use when implementing, refactoring, or fixing shell scripts that should be delivered with executable tests.
License
MIT
Instructions
112 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Shell Script Creation

Coordinate shell implementation and black-box BATS testing as one workflow. Do not report success until the relevant tests and static checks pass.

## Inputs

Accept from the skill invocation:

- Script purpose and target path
- Required inputs, environment variables, and dependencies
- Expected output, side effects, and error behavior
- Portability requirements, such as supported shells and operating systems

Ask for any missing detail that materially changes the implementation. Infer routine repository conventions from existing scripts and tests.

## Workflow

### 1. Inspect the repository and tools

Read relevant scripts, tests, build conventions, and repository guidance before editing. Check whether required tools are available, including:

- The target shell
- `shellcheck`
- `bats`
- Docker or other external tools only when the requested behavior requires them

Do not install missing tools or dependencies without user approval. If a required tool remains unavailable, continue with safe work that does not depend on it and report the validation gap.

### 2. Select specialists

Select installed agents by declared capability:

- A shell script engineer for implementation and implementation fixes
- A BATS test engineer for black-box tests, test fixes, and test execution

Use each runtime's exact registered agent identifier. Do not assume Claude-style, Codex-style, or filename-derived identifiers. If a matching agent is unavailable, perform that phase directly and note the fallback in the final result.

### 3. Implement the script

Give the shell implementation specialist the complete requirements and relevant repository context. Require it to:

- Follow the repository's established shell and filename conventions
- Prefer portable, readable constructs
- Validate inputs and failures clearly
- Keep control flow flat with guard clauses where practical
- Run the appropriate shell syntax check and ShellCheck
- Return changed paths, commands run, results, and remaining risks

Wait for implementation to finish before creating or updating tests.

### 4. Create and run BATS coverage

Give the BATS specialist the script path, requirements, and expected observable behavior. Require black-box coverage for:

- Successful behavior
- Expected failures and invalid inputs
- Important edge cases and idempotency where relevant
- Standard output, standard error, exit status, and external side effects
- Isolated filesystem or Docker resources with reliable cleanup

Require the specialist to run BATS and ShellCheck and return test paths, commands, results, and reproducible failure details.

### 5. Classify and route failures

The skill orchestrator owns the feedback loop. Do not require one specialist to invoke another.

- **Test defect**: Send the failing assertion, observed behavior, and expected behavior to the BATS specialist. Ask it to correct the test and rerun the suite.
- **Script defect**: Send the failing test, reproduction, observed behavior, and expected behavior to the shell specialist. After the script fix, ask the BATS specialist to rerun the suite.
- **Requirement ambiguity**: Ask the user before choosing behavior that materially changes the contract.
- **Environment or dependency failure**: Report the exact blocker and the validation that remains incomplete.

Continue only while each correction round makes meaningful progress. Stop after three unsuccessful correction rounds, or earlier if the same blocker repeats without new evidence. Never report success with failing tests.

### 6. Perform final verification

Run or confirm the narrowest relevant checks:

- Shell syntax validation for each changed script
- ShellCheck for changed scripts and BATS files
- The focused BATS suite
- Any directly relevant repository test target

Verify that temporary files and external test resources are cleaned up.

### 7. Report the result

Return:

- Script paths created or updated
- BATS test and helper paths created or updated
- Required environment variables and a concise usage example
- Validation commands and results
- Coverage summary
- Fallbacks, unresolved failures, or remaining risks

## Documentation

Use lowercase snake_case for new standalone documentation filenames, except conventional ecosystem filenames.

For versioned standalone documentation, keep `Version`, `Date`, and `Notes` metadata synchronized with the filename. Before editing, inspect Git history and upstream or remote-tracking refs. Never edit a published version; preserve it and create the next version. If publication status is uncertain, treat committed documentation as published. Canonical living files that require fixed paths may be updated in place.

## Completion criteria

Report successful completion only when:

- The requested script behavior is implemented
- BATS coverage exercises the required success, failure, and edge cases
- All focused BATS tests pass
- Shell syntax checks and ShellCheck pass
- Usage and validation results are documented

From twistingmercury/agents-skills, MIT.

More from twistingmercury/agents-skills

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Sep 30, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from twistingmercury

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get shell-script running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying shell-script?

CallGet help
Cite this page

shell-script skill. Agent Mart. https://agentmart.dev/skills/twistingmercury-shell-script (last updated 2026-10-24)