custom_github_copilot_agent_builder: Instructions file for GitHub Copilot

.github/instructions/shell.instructions.md

custom_github_copilot_agent_builder shell.instructions.md is an instructions file for GitHub Copilot from dhar174/custom_github_copilot_agent_builder. It costs 994 tokens per session, scanned C, original, MIT.

A set of rules for writing shell scripts, which are programs run by command-line tools such as Bash, sh, or zsh.

In plain words
What is it for?
Use it to create automation and test scripts with safer variables, error handling, validation, readable commands, and ShellCheck checks.
Why use it?
It helps avoid common script failures, unsafe input handling, unclear output, and hard-to-diagnose errors.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file. Also seen: positional $N argument.

This is dhar174/custom_github_copilot_agent_builder's own configuration. It tells GitHub Copilot how to work on custom_github_copilot_agent_builder itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything custom_github_copilot_agent_builder configures →

Reuse

Borrowing it

Nothing to install: this file belongs to dhar174/custom_github_copilot_agent_builder. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dhar174/custom_github_copilot_agent_builder/main/.github/instructions/shell.instructions.md
Clone the repo
git clone --depth 1 https://github.com/dhar174/custom_github_copilot_agent_builder

Made for: GitHub Copilot.

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 custom_github_copilot_agent_builder shell.instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/dhar174/custom_github_copilot_agent_builder/shell.svg)](https://agentmods.dev/instructions/dhar174/custom_github_copilot_agent_builder/shell)
Your own site
<a href="https://agentmods.dev/instructions/dhar174/custom_github_copilot_agent_builder/shell"><img src="https://agentmods.dev/badge/instructions/dhar174/custom_github_copilot_agent_builder/shell.svg" alt="Measured on agentmods" height="20"></a>
Per session 994 This file is loaded in full into every session.
When invoked 994 The same file — it is already loaded in full.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00994 $0.00994
Opus 5 $0.00497 $0.00497
Sonnet 5 $0.00199 $0.00199
Haiku 4.5 $0.00099 $0.00099

Measured 3d ago against content hash 3f44bbf86fea, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade C, and why

custom_github_copilot_agent_builder shell.instructions.md scanned grade C with 1 finding 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 3d ago.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf "$TEMP_DIR"
.github/instructions/shell.instructions.md · 133 lines

How it starts

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

Shell Scripting Guidelines

Instructions for writing clean, safe, and maintainable shell scripts for bash, sh, zsh, and other shells.

General Principles

  • Generate code that is clean, simple, and concise
  • Ensure scripts are easily readable and understandable
  • Add comments where helpful for understanding how the script works
  • Generate concise and simple echo outputs to provide execution status
  • Avoid unnecessary echo output and excessive logging
  • Use shellcheck for static analysis when available
  • Assume scripts are for automation and testing rather than production systems unless specified otherwise
  • Prefer safe expansions: double-quote variable references ("$var"), use ${var} for clarity, and avoid eval
  • Use modern Bash features ([[ ]], local, arrays) when portability requirements allow; fall back to POSIX constructs only when needed
  • Choose reliable parsers for structured data instead of ad-hoc text processing

Error Handling & Safety

  • Always enable set -euo pipefail to fail fast on errors, catch unset variables, and surface pipeline failures
  • Validate all required parameters before execution
  • Provide clear error messages with context
  • Use trap to clean up temporary resources or handle unexpected exits when the script terminates
  • Declare immutable values with readonly (or declare -r) to prevent accidental reassignment
  • Use mktemp to create temporary files or directories safely and ensure they are removed in your cleanup handler

Script Structure

  • Start with a clear shebang: #!/bin/bash unless specified otherwise
  • Include a header comment explaining the script's purpose
  • Define default values for all variables at the top
  • Use functions for reusable code blocks
  • Create reusable functions instead of repeating similar blocks of code
  • Keep the main execution flow clean and readable

Working with JSON and YAML

  • Prefer dedicated parsers (jq for JSON, yq for YAML—or jq on JSON converted via yq) over ad-hoc text processing with grep, awk, or shell string splitting
  • When jq/yq are unavailable or not appropriate, choose the next most reliable parser available in your environment, and be explicit about how it should be used safely
  • Validate that required fields exist and handle missing/invalid data paths explicitly (e.g., by checking jq exit status or using // empty)
  • Quote jq/yq filters to prevent shell expansion and prefer --raw-output when you need plain strings
  • Treat parser errors as fatal: combine with set -euo pipefail or test command success before using results
  • Document parser dependencies at the top of the script and fail fast with a helpful message if jq/yq (or alternative tools) are required but not installed

Read the full file on GitHub · 133 lines

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. 3d ago First seen · 133 lines · 994 tokens per session scan C 3f44bbf86fea

Subscribe to this mod's changes

custom_github_copilot_agent_builder shell.instructions.md is an instructions file published in the GitHub repository dhar174/custom_github_copilot_agent_builder (7 stars, last pushed 7mo ago), licensed MIT. It adds 994 tokens to every session, about $0.0050 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens