bash-logging

bash-logging is a skill for Claude Code from Jamie-BitFlight/claude_skills. It costs 60 tokens per session (1,473 once invoked), scanned A, original, MIT.

A guide for adding structured logging to Bash scripts, including log levels, terminal colors, status icons, and CI/CD output sections. CI/CD means automated build, test, and deployment workflows.

In plain words
What is it for?
Use it to add log functions, configurable verbosity, colored terminal output, and output grouped for continuous-integration systems.
Why use it?
It makes script output easier to read and helps separate useful information, warnings, errors, and debugging details.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the bash-development plugin — 8 skills, 2 agents shipped together

Good fit Use it to add log functions, configurable verbosity, colored terminal output, and output grouped for continuous-integration systems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jamie-bitflight/claude_skills/bash-logging
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Jamie-BitFlight/claude_skills --skill bash-logging
Clone the repo
git clone --depth 1 https://github.com/Jamie-BitFlight/claude_skills

Made for: Claude Code.

Or install bash-development, the plugin that ships this one along with the rest of its 8 skills, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bash-logging

README.md
[![agentmods](https://agentmods.dev/badge/skills/jamie-bitflight/claude_skills/bash-logging/github.svg)](https://agentmods.dev/skills/jamie-bitflight/claude_skills/bash-logging)
Your own site
<a href="https://agentmods.dev/skills/jamie-bitflight/claude_skills/bash-logging"><img src="https://agentmods.dev/badge/skills/jamie-bitflight/claude_skills/bash-logging/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bash-logging

Your own site · 80×15
<a href="https://agentmods.dev/skills/jamie-bitflight/claude_skills/bash-logging"><img src="https://agentmods.dev/badge/skills/jamie-bitflight/claude_skills/bash-logging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,473 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.01473
Opus 5.5 $0.00024 $0.00589
Sonnet 5.5 $0.00012 $0.00295
Haiku 4.5 $0.00006 $0.00147

Measured 2mo ago against content hash 6e1265ec4d75, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bash-logging scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/log_functions.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/bash-development/skills/bash-logging/SKILL.md · 225 lines

How it starts

The opening of the file, as written. The whole thing — 225 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Bash Logging

Structured logging patterns for bash scripts with color support, emoji icons, and CI/CD integration.

Basic Logging Functions

Simple, portable logging implementation:

# Color definitions
declare -A colors=(
    [green]=$'\033[0;32m'
    [red]=$'\033[0;31m'
    [yellow]=$'\033[1;33m'
    [blue]=$'\033[0;34m'
    [reset]=$'\033[0m'
)

declare -A emojis=(
    [success]='✅'
    [error]='❌'
    [warning]='⚠️'
    [info]='ℹ️'
    [debug]='🐛'
)

# Logging functions
print_success() {
    printf '%b %b%b%b\n' "${emojis[success]}" "${colors[green]}" "$*" "${colors[reset]}"
}

print_error() {
    printf '%b %b%b%b\n' "${emojis[error]}" "${colors[red]}" "$*" "${colors[reset]}" >&2
}

print_warning() {
    printf '%b %b%b%b\n' "${emojis[warning]}" "${colors[yellow]}" "$*" "${colors[reset]}"
}

print_info() {
    printf '%b %b\n' "${emojis[info]}" "$*"
}

print_debug() {
    [[ -n "${DEBUG:-}" ]] && printf '%b %b%b%b\n' "${emojis[debug]}" "${colors[blue]}" "$*" "${colors[reset]}"
}

Log Levels

Implement configurable log levels.

Code examples

TTY Detection

Disable colors in non-interactive environments:

setup_colors() {
    if [[ -t 1 ]] && [[ -z "${NO_COLOR:-}" ]]; then
        # Terminal supports colors
        COLOR_RED=$'\033[0;31m'
        COLOR_GREEN=$'\033[0;32m'
        COLOR_YELLOW=$'\033[1;33m'
        COLOR_BLUE=$'\033[0;34m'
        COLOR_RESET=$'\033[0m'
    else
        # No color support
        COLOR_RED=''
        COLOR_GREEN=''
        COLOR_YELLOW=''
        COLOR_BLUE=''
        COLOR_RESET=''
    fi
}

# CI environments often support colors
detect_color_support() {
    if [[ -n "${CI:-}" ]] || [[ -n "${GITLAB_CI:-}" ]] || [[ -n "${GITHUB_ACTIONS:-}" ]]; then
        return 0  # CI environment, enable colors
    elif [[ -t 1 ]]; then
        return 0  # Terminal, enable colors
    else
        return 1  # No color support
    fi
}

GitLab CI Collapsible Sections

Read the full file on GitHub · 225 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 225 lines · 60 tokens per session scan A 6e1265ec4d75

Subscribe to this mod's changes

bash-logging is a skill published in the GitHub repository Jamie-BitFlight/claude_skills (67 stars, last pushed 19d ago), licensed MIT. It adds 60 tokens to every session and 1,473 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

bash-logging compared with skills from other repositories

bash-logging next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
bash-loggingJamie-BitFlight/claude_skillsSkill6719d agoMITA60Claude Code
golang-continuous-integrationsamber/cc-skills-golangSkill3.8k7d agoMITA181Claude Code
kotlin-tooling-gradle-to-kotlin-toolchain-projectKotlin/kotlin-agent-skillsSkill1.1k8d agoApache-2.0A83Claude Code, Codex
temps-split-modulegotempsh/tempsSkill904yesterdayApache-2.0A118Claude Code, Codex
temps-plugingotempsh/tempsSkill904yesterdayApache-2.0A92Claude Code, Codex
sdk-container-publishingAaronontheweb/dotnet-skillsSkill1.3k10d agoMITA63Claude Code
deploy-to-tempsgotempsh/tempsSkill904yesterdayApache-2.0A141Claude Code, Codex