agentleFS
metyatechmetyatech/skill-command-execution/SKILL.md

command-execution

Skill0 starsChanged 7 months agoMITView on GitHub

Use when executing shell commands or external processes that require platform-aware procedures, federated identity handoff to a real browser session, agent-browser session retry, privilege elevation fallback paths, or destructive file deletion safety. Triggers when invariants in the `command-execution` rule module need procedural how-to detail.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. metraton/gaia★ 4same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 10 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    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. Distinctive:

    When an automation-launched browser context is blocked or degraded during a federated identity flow (Google, Apple, Microsoft, GitHub):

    line 14
  2. Distinctive:

    Stop the automation at the moment the IdP redirect URL is reached.

    line 18
  3. Distinctive:

    Wait for the post-IdP redirect back to the application's callback URL.

    line 23
  4. Distinctive:

    When the default agent-browser session bind fails on Windows:

    line 34
  5. Distinctive:

    If multiple binds fail in sequence, capture the error and surface it.

    line 39
  6. Very specific:

    If sudo is not on PATH, check for gsudo (a PowerShell-friendly elevation tool) and use it if available.

    line 50
  7. Very specific:

    NEVER spawn a separate elevated shell window such as Start-Process -Verb RunAs from inside an automation flow — the parent loses …

    line 54
  8. Distinctive:

    When the rule module requires verifying the final absolute target path before a destructive operation:

    line 61
  9. Distinctive:

    After deletion, re-stat the path and verify it is gone.

    line 75
  10. Distinctive:

    When the rule module requires checking the latest stable release:

    line 89
  11. Distinctive:

    Look up the latest stable release on the tool's official release feed.

    line 93
  12. Distinctive:

    If the failure persists, document the version, exact command, and reproduction steps as a verified limitation.

    line 98

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Command execution procedures

This skill provides procedural how-to for the invariants defined in the command-execution rule module. The rule module states what must hold; this skill states how to comply.

Federated identity flow handoff

When an automation-launched browser context is blocked or degraded during a federated identity flow (Google, Apple, Microsoft, GitHub):

  1. Stop the automation at the moment the IdP redirect URL is reached. Do not attempt to fill the IdP form from automation.
  2. Hand off the IdP step to a real browser session via Chrome DevTools Protocol attach, or by asking the user to complete the sign-in step interactively.
  3. Wait for the post-IdP redirect back to the application's callback URL.
  4. Resume automation from the post-callback state.

The agent MUST NOT attempt to bypass provider anti-automation, embedded-browser restrictions, or "this browser is not secure" gates. Such bypasses are explicitly forbidden by the command-execution rule module.

Agent-browser session retry

When the default agent-browser session bind fails on Windows:

  1. Choose an explicit, task-scoped session name (e.g., task-<short-id>).
  2. Retry the bind with the new name.
  3. If multiple binds fail in sequence, capture the error and surface it; do not loop indefinitely.
  4. Track every session name your task opens so you can close them on completion.

Privilege elevation fallback

The rule module requires sudo first; this is the fallback ladder when sudo is unavailable:

  1. Try sudo <command> directly.
  2. If sudo is not on PATH, check for gsudo (a PowerShell-friendly elevation tool) and use it if available.
  3. As a last resort, instruct the user to re-run the command in an elevated terminal session.
  4. NEVER spawn a separate elevated shell window such as Start-Process -Verb RunAs from inside an automation flow — the parent loses stdout/stderr capture and exit code propagation.

Destructive PowerShell file deletion safety

When the rule module requires verifying the final absolute target path before a destructive operation:

  1. Resolve the target with [System.IO.Path]::GetFullPath($candidate) or Resolve-Path -LiteralPath $candidate.
  2. Assert the resolved path is inside the expected directory tree before deleting.
  3. Normalize file attributes (attrib -r -h -s) on read-only, hidden, or system files before attempting deletion.
  4. Prefer [System.IO.File]::Delete() / [System.IO.Directory]::Delete($path, $true) over the rm alias, which dispatches through provider hooks that may silently fail on locked files.
  5. After deletion, re-stat the path and verify it is gone.

Avoiding interactive git prompts

The rule module forbids interactive git prompts. Apply one of these in every git invocation that might open an editor:

  • Pass --no-edit to merge, revert, cherry-pick, etc.
  • Set GIT_EDITOR=true for the invocation.
  • For commit messages, always pass -m "<msg>" or use a here-doc.

Diagnosing third-party tool failures

When the rule module requires checking the latest stable release:

  1. Determine the currently installed version (<tool> --version or package manager query).
  2. Look up the latest stable release on the tool's official release feed.
  3. Upgrade to the latest stable in an isolated install if feasible.
  4. Re-run the failing command on the latest stable.
  5. If the failure persists, document the version, exact command, and reproduction steps as a verified limitation.
  6. Implement the smallest deterministic workaround that does not bypass safety checks.

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.