joedaws/agent-techniques / skills/weekly-companion
weekly-companion
VerifiedUse in a long-running (one week) personal session driven from a phone — capture voice-to-text messages verbatim, turn them into work/life todos and an effort log, persist everything to the private data repo after every message, and answer "what are my priorities" with a ranked work + life list. Trigger when the user says "start my week", "capture", "priorities", "what did I do", "end the week", "/weekly-companion", or sends a rambling dictated note in a repo that has a weeks/ directory.
| File | Kind | Size |
|---|---|---|
| .shellcheckrc | other | 22 B |
| SKILL.md | skill md | 6.2 KB |
| scripts/bootstrap.shexecutable | script | 2.7 KB |
| scripts/capture.shexecutable | script | 1.5 KB |
| scripts/lib.sh | script | 1.7 KB |
| scripts/sync.shexecutable | script | 2.7 KB |
| scripts/week-init.shexecutable | script | 3.6 KB |
| scripts/week-stats.shexecutable | script | 3.5 KB |
| templates/CLAUDE.md | markdown | 730 B |
| templates/areas.md | markdown | 381 B |
| tests/run-tests.shexecutable | script | 2.2 KB |
| tests/test-cases.sh | script | 7.2 KB |
scripts/sync.sh
View on GitHub#!/usr/bin/env bash
# Commits the data repo's tracked areas (weeks/, areas.md) and pushes, retrying
# network failures with exponential backoff. Cloud containers are reclaimed
# when idle, so anything not pushed is lost.
set -o errexit
set -o nounset
set -o pipefail
IFS=$'\n\t'
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
readonly SCRIPT_DIR
# shellcheck source=lib.sh
source "${SCRIPT_DIR}/lib.sh"
readonly MAX_PUSH_ATTEMPTS=4
# Overridable so tests need not wait through real backoff.
readonly INITIAL_BACKOFF_SECONDS="${WEEKLY_SYNC_BACKOFF_SECONDS:-2}"
readonly AREAS_FILE="areas.md"
usage() {
printf 'Usage: %s --message <commit msg> [--root <data-repo>] [--branch <name>]\n' "$(basename "$0")" >&2
}
commit_changes() {
local root="$1"
local message="$2"
local paths=("${WEEKS_DIR_NAME}")
[[ -e "${root}/${AREAS_FILE}" ]] && paths+=("${AREAS_FILE}")
git -C "${root}" add -- "${paths[@]}"
if git -C "${root}" diff --cached --quiet; then
log_info "no data changes to commit"
return 0
fi
git -C "${root}" commit --quiet -m "${message}"
log_info "committed: ${message}"
}
push_with_retry() {
local root="$1"
local branch="$2"
local attempt=1
local backoff="${INITIAL_BACKOFF_SECONDS}"
while ! git -C "${root}" push --quiet -u origin "HEAD:refs/heads/${branch}"; do
((attempt < MAX_PUSH_ATTEMPTS)) \
|| die "push to ${branch} failed after ${MAX_PUSH_ATTEMPTS} attempts; data is committed locally only"
log_info "push attempt ${attempt} failed; retrying in ${backoff}s"
sleep "${backoff}"
attempt=$((attempt + 1))
backoff=$((backoff * 2))
done
log_info "pushed to origin/${branch}"
}
main() {
local requested_root=""
local message=""
local branch=""
while (($# > 0)); do
case "$1" in
--root) requested_root="${2:?--root needs a value}"; shift 2 ;;
--message) message="${2:?--message needs a value}"; shift 2 ;;
--branch) branch="${2:?--branch needs a value}"; shift 2 ;;
-h|--help) usage; exit 0 ;;
*) usage; die "unknown argument: $1" ;;
esac
done
[[ -n "${message}" ]] || { usage; die "--message is required"; }
local root
root="$(resolve_root "${requested_root}")"
[[ -d "${root}/${WEEKS_DIR_NAME}" ]] || die "no ${WEEKS_DIR_NAME}/ in ${root}; run week-init.sh first"
if [[ -z "${branch}" ]]; then
branch="$(git -C "${root}" symbolic-ref --quiet --short HEAD)" \
|| die "detached HEAD in ${root}; pass --branch <name>"
fi
commit_changes "${root}" "${message}"
push_with_retry "${root}" "${branch}"
}
main "$@"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |