Skip to content

piabrota/gramatico / skills/ptbr-routing

ptbr-routing

Unverified

Escolhe a skill e o nível de rigor antes de carregar uma skill de escrita em pt-BR. Use quando o pedido é escrever, reescrever ou revisar texto em português e não diz o nível nem a skill.

FileKindSize
SKILL.mdskill md980 B
bin/linux-aarch64/ptbrexecutablescript516.3 KB
bin/linux-x86_64/ptbrexecutablescript556.8 KB
bin/run.shexecutablescript613 B
routes.tsvother664 B
scripts/session-check.shexecutablescript2.5 KB

scripts/session-check.sh

View on GitHub
#!/usr/bin/env bash
# session-check — the SessionStart hook a repo's .claude/settings.json runs. On `source: startup`
# only, and only while the plugin is not installed, one line asking the agent to offer it. Local
# files only: no network, no writes. Silent otherwise, so it costs no context once installed.
#
#   session-check.sh < hook-input.json
#   session-check.sh --self-test
set -euo pipefail

PLUGIN="gramatico@gramatico"

optin_line() {
  echo "▸ gramatico plugin not installed. Before starting the person's request, if AskUserQuestion is available, ask once: \"This repo offers the gramatico plugin (the /ptbr-writer, /ptbr and /cientifico skills, pt-BR technical writing). Routing works either way.\" Options: Install (they run \`! claude plugin install ${PLUGIN}\`), Not now (nothing), Never (add \"env\": {\"PTBR_PLUGIN_OPTOUT\": \"1\"} to $1). Then carry on. With no way to ask, say nothing about it."
}

check() {
  local input source cfg
  input=$(cat 2>/dev/null || true)
  source=$(sed -n 's/.*"source" *: *"\([a-z]*\)".*/\1/p' <<<"$input" | head -1)
  [ "${source:-startup}" = startup ] || return 0
  cfg="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
  [ "${CLAUDE_CODE_REMOTE:-}" != true ] || return 0
  [ -z "${PTBR_PLUGIN_OPTOUT:-}" ] || return 0
  ! grep -q '"PTBR_PLUGIN_OPTOUT"' "$cfg/settings.json" 2>/dev/null || return 0
  ! grep -q "\"$PLUGIN\"" "$cfg/plugins/installed_plugins.json" 2>/dev/null || return 0
  optin_line "${cfg/#"$HOME"/\~}/settings.json"
}

self_test() {
  local tmp out
  tmp=$(mktemp -d); trap 'rm -rf "$tmp"' RETURN
  unset PTBR_PLUGIN_OPTOUT CLAUDE_CODE_REMOTE
  mkdir -p "$tmp/plugins"
  out=$(CLAUDE_CONFIG_DIR=$tmp check <<<'{"source":"startup"}')
  [[ $out == "▸ gramatico plugin not installed."* ]] || { echo "FAIL: no offer when not installed" >&2; return 1; }
  out=$(CLAUDE_CONFIG_DIR=$tmp check <<<'{"source":"resume"}')
  [ -z "$out" ] || { echo "FAIL: offer on resume" >&2; return 1; }
  echo "{\"plugins\": {\"$PLUGIN\": []}}" >"$tmp/plugins/installed_plugins.json"
  out=$(CLAUDE_CONFIG_DIR=$tmp check <<<'{"source":"startup"}')
  [ -z "$out" ] || { echo "FAIL: offer when installed" >&2; return 1; }
  rm "$tmp/plugins/installed_plugins.json"
  echo '{"env": {"PTBR_PLUGIN_OPTOUT": "1"}}' >"$tmp/settings.json"
  out=$(CLAUDE_CONFIG_DIR=$tmp check <<<'{"source":"startup"}')
  [ -z "$out" ] || { echo "FAIL: offer after opt-out" >&2; return 1; }
  echo "session-check self-test: ok"
}

case "${1-}" in
  --self-test) self_test ;;
  *) check ;;
esac
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall