AgentStack
SKILL verified MIT Self-run

Brain Share

skill-toroleapinc-claude-brain-brain-share · by toroleapinc

Share a skill, agent, or rule with the team by copying it to the shared namespace

No reviews yet
0 installs
11 views
0.0% view→install

Install

$ agentstack add skill-toroleapinc-claude-brain-brain-share

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Brain Share? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Share an artifact with the team by copying it to the shared namespace.

Usage: /brain-share

  • type: 'skill', 'agent', or 'rule'
  • name: the filename (e.g., 'my-skill.md' or 'important-rule.md')
  • Use /brain-share --list to see what's currently shared

Arguments: $ARGUMENTS

Steps

  1. Parse arguments:

```bash ARGS=($ARGUMENTS) TYPE="${ARGS[0]:-}" NAME="${ARGS[1]:-}"

# Handle --list flag if [ "$TYPE" = "--list" ] || [ "$TYPE" = "list" ]; then echo "Delegating to /brain-shared-list..." # The agent should invoke /brain-shared-list skill instead exit 0 fi

if [ -z "$TYPE" ] || [ -z "$NAME" ]; then echo "Usage: /brain-share " echo " /brain-share --list" echo "Types: skill, agent, rule" echo "Example: /brain-share skill my-useful-tool.md" exit 1 fi

# Validate type case "$TYPE" in skill|agent|rule) ;; *) echo "ERROR: Type must be 'skill', 'agent', or 'rule'"; exit 1 ;; esac ```

  1. Check if the artifact exists locally:

```bash source "${CLAUDEPLUGINROOT}/scripts/common.sh"

case "$TYPE" in skill) SOURCEFILE="${CLAUDEDIR}/skills/${NAME}" ;; agent) SOURCEFILE="${CLAUDEDIR}/agents/${NAME}" ;; rule) SOURCEFILE="${CLAUDEDIR}/rules/${NAME}" ;; esac

if [ ! -f "$SOURCEFILE" ]; then echo "ERROR: $TYPE '$NAME' not found at: $SOURCEFILE" echo "" echo "Available ${TYPE}s:" case "$TYPE" in skill) ls "${CLAUDEDIR}/skills/" 2>/dev/null || echo " (none)" ;; agent) ls "${CLAUDEDIR}/agents/" 2>/dev/null || echo " (none)" ;; rule) ls "${CLAUDE_DIR}/rules/" 2>/dev/null || echo " (none)" ;; esac exit 1 fi ```

  1. Ask the user for confirmation before sharing:

"Share $TYPE '$NAME' with all machines in the brain network? This will be visible to all machines that sync with this brain." Wait for user to confirm before proceeding.

  1. Copy to shared namespace:

```bash # Create shared directory structure mkdir -p "${BRAINREPO}/shared/skills" "${BRAINREPO}/shared/agents" "${BRAIN_REPO}/shared/rules"

case "$TYPE" in skill) TARGETFILE="${BRAINREPO}/shared/skills/${NAME}" ;; agent) TARGETFILE="${BRAINREPO}/shared/agents/${NAME}" ;; rule) TARGETFILE="${BRAINREPO}/shared/rules/${NAME}" ;; esac

# Copy the file cp "$SOURCEFILE" "$TARGETFILE" log_info "Copied $TYPE '$NAME' to shared namespace"

# Show the content preview echo "" echo "Shared $TYPE content preview:" echo "---" head -20 "$TARGET_FILE" if [ $(wc -l /dev/null; then echo "No changes to commit (file may already be shared)." else git commit -m "Share $TYPE: $NAME (from $(hostname))"

# Try to push if git push origin main 2>/dev/null; then echo "" echo "✓ $TYPE '$NAME' has been shared with the team!" echo " Team members will receive it on their next brain sync." else echo "" echo "⚠ $TYPE shared locally, but failed to push to remote." echo " Run /brain-sync to retry pushing to the team." fi fi ```

  1. Show sharing info:

``bash echo "" echo "Shared artifact location: shared/$TYPE/$NAME" echo "Team members will see this $TYPE after their next sync." ``

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.