agentleFS
Cogni-AI-OUCogni-AI-OU/cogni-ai-agent-skills/shell/SKILL.md

shell

Skill4 starsChanged 7 months agoMITView on GitHub

Efficient shell command handling. You MUST load this skill when handling shell commands with performance monitoring or timeouts.

21 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use update-cli-config, migrate-to-skills and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • PandelisZSkill

    update-cli-config

    View and modify Cursor CLI configuration settings in ~/.cursor/cli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.

    Also in 6 projects that use this

  • 32103210Skill

    migrate-to-skills

    Convert 'Applied intelligently' Cursor rules (.cursor/rules/*.mdc) and slash commands (.cursor/commands/*.md) to Agent Skills format (.cursor/skills/). Use when you want to migrate rules or commands to skills, convert .mdc rules to SKILL.md format, or consolidate commands into the skills directory.

    Also in 6 projects that use this

  • 32103210Skill

    update-cursor-settings

    Modify Cursor/VSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.

    Also in 6 projects that use this

  • 0mlkrizzz655335vSkill

    review-bugbot

    缺陷导向代码审查。用 Bugbot 子代理找 bug。

    Also in 3 projects that use this

  • 0mlkrizzz655335vSkill

    sdk

    Codex SDK 集成开发。用 TypeScript/Python SDK 做 agent 生命周期、流式输出、本地/云端执行等集成。

    Also in 5 projects that use this

  • Tsumugii24Skill

    split-to-prs

    Split current work into small reviewable PRs. Use when the user asks to split a chat, set of changes, branch, or PR.

    Also in 5 projects that use this

  • +2 more from 32103210
  • +1 more from 0mlkrizzz655335v

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use timeout to prevent indefinite hangs:

    line 44
  2. Very specific:

    Use time for all long operations to track performance

    line 61
  3. Distinctive:

    If command results are unexpected, briefly explain what happened and why.

    line 63

“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Shell Handling Skill

Execute shell commands with performance monitoring and timeout protection.

When to Use

  • Commands that might hang indefinitely
  • Long-running commands (builds, tests, deployments)
  • Performance optimization and debugging

When Not to Use

  • Quick, reliable commands that execute in milliseconds
  • Interactive terminal sessions requiring human input
  • Operations better handled by specialized built-in agents or native APIs

Common Pitfalls

  • Ignoring Exit Codes: Piping with time or timeout can mask the exit code of the underlying command. Use set -o pipefail or check $? carefully.
  • Overly Aggressive Timeouts: Setting a timeout too close to the expected duration can cause false failures on slower environments (like CI/CD). Add a healthy buffer.
  • Runaway Child Processes: timeout might not kill child processes spawned by the target command unless used with --kill-after or running in a new process group.

Core Patterns

Measure Execution Time

Prefix commands with time for duration visibility:

time command
time npm run build

Limit Execution Time

Use timeout to prevent indefinite hangs:

timeout 30s command
timeout 60s npm test || echo "Failed or timed out"

Combined Usage

time timeout 300s build_script.sh

Key Points

  • Combine with || for error handling fallbacks
  • Set timeout based on expected runtime plus buffer
  • Use time for all long operations to track performance
  • timeout --kill-after=5s 30s for forceful termination if needed
  • If command results are unexpected, briefly explain what happened and why.

Related Skills

  • robust-commands: You MUST load this skill when executing commands requiring resilient error recovery or fallbacks.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.