aws-sync
Skill11 starsChanged 3 months agoApache-2.0View on GitHub
Sync a local directory to or from S3 with a dry run, a backgrounded transfer, and a progress-tracking watch command. Usage: /aws-sync <upload|download> <local_dir> <remote_dir> [--region <region>] [extra aws s3 sync flags...]
In this repository6 other files it gives its agents.
- ensure-english-consistencySkill
- expand-writingSkill
- fix-precommitSkill
- generate-reportSkill
- inspect-dataSkill
- review-paperSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 36
Dry run first, always: Run in the foreground:
- Very specific: line 49
Do not skip this even if the user approved a similar sync earlier in the conversation.
- Very specific: line 64
Never hardcode an S3 bucket name or path -- it always comes from the remote_dir argument the user supplies.
- Distinctive: line 66
Never skip the dry run, and never start the real transfer without explicit user confirmation shown against that dry run's numbers.
- Very specific: line 68
Keep all log files under /tmp.
≈ “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.
Files
Sync a local directory to or from S3, always dry-running first and running the real transfer in the background so it survives terminal/session disconnects.
Parse the argument string:
- Token 1: mode, must be
uploadordownload. If missing or not one of these two values, ask the user which mode they want rather than guessing. - Token 2:
local_dir(a local filesystem path). - Token 3:
remote_dir(the full S3 path, e.g.s3://some-bucket/some/prefix, including the bucket). Never hardcode a bucket name or path in this skill -- the bucket always comes from whatever the user passes asremote_dir. - Remaining tokens: optional flags. Recognize
--region <value>(default tous-east-1if not given); pass any other flags through verbatim toaws s3 sync.
Determine source and destination from mode:
upload: source =local_dir, destination =remote_dirdownload: source =remote_dir, destination =local_dir
Derive a job name from the basename of local_dir, with any character outside
[A-Za-z0-9_-] replaced by _. Use it to name log files, always under /tmp:
- dry run log:
/tmp/aws_sync_<job_name>_dryrun.log - real transfer log:
/tmp/aws_sync_<job_name>.log
Steps:
- Validate paths.
upload: confirmlocal_direxists (ls -ld <local_dir>). If it doesn't, stop and report -- do not create it.download: createlocal_dirif needed (mkdir -p <local_dir>) since it's the destination.
- Dry run first, always. Run in the foreground:
Then get the file count withaws s3 sync <source> <destination> --region <region> --dryrun [extra flags] > <dryrun_log> 2>&1wc -l < <dryrun_log>. - Report before doing anything real. Tell the user the mode, source, destination, region, and the file count from the dry run. If the count is 0, report that everything is already in sync and stop -- do not proceed to step 4.
- Confirm before the real transfer. This moves real data into or out of cloud
storage and can overwrite existing objects/files, so always confirm with the user
before proceeding past the dry run -- show them the file count and both paths.
Do not skip this even if the user approved a similar sync earlier in the
conversation; each new
local_dir/remote_dirpair needs its own confirmation. - Launch the real sync in the background, once confirmed:
nohup aws s3 sync <source> <destination> --region <region> [extra flags] > <real_log> 2>&1 & disown - Give the user a progress command, using the total captured in step 2:
watch -n 5 'echo "<job_name>: $(wc -l < <real_log> 2>/dev/null || echo 0) / <total_from_dryrun>"'
Rules:
- Never hardcode an S3 bucket name or path -- it always comes from the
remote_dirargument the user supplies. - Never skip the dry run, and never start the real transfer without explicit user confirmation shown against that dry run's numbers.
- Keep all log files under
/tmp.
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
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.

