CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

bash-defensive-patterns

Master defensive Bash programming techniques for production-grade scripts. Use when writing robust shell scripts, CI/CD pipelines, or system utilities requiring fault tolerance and safety.

Quality

70%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

Fix and improve this skill with Tessl

tessl review fix ./skills_all/bash-defensive-patterns/SKILL.md
SKILL.md
Quality
Evals
Security

Quality

Content

57%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A well-organized, largely executable pattern library with genuinely useful defensive techniques (strict mode, traps, atomic writes, signal orchestration, idempotency). Its weaknesses are length and redundancy — re-teaching basic bash knowledge Claude already has with repeated boilerplate — and the absence of any progressive disclosure layer or end-to-end workflow with validation checkpoints.

Suggestions

Delete or compress sections covering knowledge Claude already has (variable quoting, $() vs backticks, [[ ]] vs [ ], command -v vs which) and state the '#!/bin/bash set -Eeuo pipefail' header once instead of in every block.

Split the ten patterns into one-level-deep reference files (e.g. references/patterns.md) with SKILL.md kept as a concise overview plus the core principles.

Add one end-to-end worked example that assembles the patterns into a single script with explicit validate-and-retry checkpoints, and fix the atomic_write readonly-variable bug.

DimensionReasoningScore

Conciseness

The ~530-line body is code-dense rather than prose-padded, but it teaches concepts Claude already knows ('Always quote variables to prevent word splitting', 'Use $() instead of backticks', '[[ ]] vs [ ]', 'command -v vs which') and repeats the '#!/bin/bash set -Eeuo pipefail' boilerplate in every one of ~15 blocks. This fits 'mostly efficient but includes some unnecessary explanation or could be tightened'; it avoids score 2 because there is little narrative padding, and avoids score 4 because entire sections re-explain basics.

3 / 5

Actionability

Most patterns are concrete, executable bash: a complete argument parser with usage(), timestamped log functions, trap-based cleanup, atomic_write, dependency checking, and a dry-run run_cmd wrapper. Minor gaps keep it at anchor 4 rather than 5: placeholder invocations like 'background_task &' and 'run_cmd cp "$source" "$dest"' with undefined variables, a typo'd 'Function Templat' heading, and an atomic_write whose 'local -r tmpfile' followed by assignment is not valid bash.

4 / 5

Workflow Clarity

The body is a pattern catalog, not a sequenced process: there is no end-to-end 'build a robust script' workflow with ordered steps and validation checkpoints. Individual patterns do embed validation (return 1 paths, || { echo ERROR; exit 1; }), which lifts it above the rough-sequence anchors 1-2, but no explicit feedback loop or checklist ties the patterns together, matching anchor 3.

3 / 5

Progressive Disclosure

No bundle files exist (no references/, scripts/, or assets/), so all ~530 lines are inlined in SKILL.md. Internal structure is good (numbered Core Principles, ten labeled Patterns, Best Practices, Resources), but content that would suit one-level-deep reference files (e.g. the pattern library) is entirely inline, fitting 'some structure but content that should be separate is inline' rather than anchor 4.

3 / 5

Total

13

/

20

Passed

Description

70%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A solid description that explicitly pairs a what with a well-triggered when clause in third-person imperative voice. Its main weakness is that the capability statement stays generic instead of naming the concrete techniques the skill actually covers.

Suggestions

Replace 'Master defensive Bash programming techniques' with 3-4 named capabilities, e.g. 'Set strict mode and error traps, handle signals and cleanup, write atomic and idempotent scripts, add dry-run support'.

Add natural trigger synonyms such as 'bash scripting', 'automation scripts', or 'deployment scripts' to broaden keyword coverage.

Trim redundant qualifiers ('requiring fault tolerance and safety') in favor of the concrete capability words.

DimensionReasoningScore

Specificity

"Master defensive Bash programming techniques for production-grade scripts" names the domain clearly but the action is generic ('master techniques') rather than listing concrete capabilities like strict mode, error trapping, or safe temp-file handling. It names the domain plus one broad action, matching the 'domain and 1-2 concrete actions, not comprehensive' anchor; it is not score 4 because no several specific actions are enumerated.

3 / 5

Completeness

Both parts are explicit: the 'what' is "Master defensive Bash programming techniques for production-grade scripts" and the 'when' is "Use when writing robust shell scripts, CI/CD pipelines, or system utilities requiring fault tolerance and safety". The when-clause has concrete triggers, but the what remains high-level ('techniques'), so it matches anchor 4 rather than the fully concrete what+when of anchor 5.

4 / 5

Trigger Term Quality

Natural phrases users would say are present: "robust shell scripts", "CI/CD pipelines", "system utilities", "Bash". Coverage is good but misses common variations like bash/shell scripting, automation scripts, or deployment scripts, so it falls just short of the comprehensive-synonyms anchor 5 and clearly above the sparse-keyword anchors 2-3.

4 / 5

Distinctiveness Conflict Risk

The defensive/robustness framing ("defensive Bash programming", "fault tolerance and safety") carves a distinct niche from general scripting or style-guide skills. There is minor overlap risk with broad 'shell scripting' or 'CI/CD' skills, fitting anchor 4 rather than the minimal-conflict anchor 5.

4 / 5

Total

15

/

20

Passed

Validation

93%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

skill_md_line_count

SKILL.md is long (534 lines); consider splitting into references/ and linking

Warning

Total

15

/

16

Passed

Repository

Microck/ordinary-claude-skills

Path

skills_all/bash-defensive-patterns/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.