factory-sync
Update the local Factory submodule pointer to latest factory/main through a small PR before running Factory-backed skills.
10 stars
byClyra-AI
Best use case
factory-sync is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Update the local Factory submodule pointer to latest factory/main through a small PR before running Factory-backed skills.
Teams using factory-sync should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
$curl -o ~/.claude/skills/factory-sync/SKILL.md --create-dirs "https://raw.githubusercontent.com/Clyra-AI/gait/main/.agents/skills/factory-sync/SKILL.md"
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/factory-sync/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How factory-sync Compares
| Feature / Agent | factory-sync | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Update the local Factory submodule pointer to latest factory/main through a small PR before running Factory-backed skills.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Factory Sync
Update this repository's `factory` submodule to the latest `factory/main` commit
through an auditable PR.
Use this skill before a Factory-backed wrapper skill when the user wants the
latest shared skill behavior.
## Workflow
1. Verify the current repo has a clean worktree.
2. Sync the default branch:
- `git fetch origin main`
- `git checkout main`
- `git pull --ff-only origin main`
3. Reset the dedicated sync branch from current `main`:
- `git checkout -B codex/update-factory-submodule main`
- do not reuse prior `codex/update-factory-submodule` history
4. Update Factory:
- `git submodule update --init factory`
- `git submodule update --remote factory`
5. If `git status --short factory .gitmodules` is empty:
- report `factory already at latest main`
- return the current `git -C factory rev-parse HEAD`
- do not create a PR
6. If the submodule pointer changed:
- ensure only `factory` and optionally `.gitmodules` changed
- `git add factory .gitmodules`
- `git commit -m "chore: update factory submodule"`
- `git push --force-with-lease -u origin codex/update-factory-submodule`
- create a PR against `main`
- merge the PR immediately without polling, waiting for, or inspecting PR CI
- do not bypass branch protection or unresolved-review requirements
- if branch protection blocks only because required checks are pending, enable
auto-merge when available or wait for the protected merge gate to clear
without inspecting CI logs
- if GitHub blocks merge for failed checks, unresolved review, permissions, or
policy, report the blocker and stop before post-merge steps
- do not delete the branch
7. Sync local `main` after merge and monitor post-merge CI.
8. If post-merge CI fails and the failure is repo-fixable, run a bounded hotfix
loop from updated `main`; stop for external, policy, safety, timeout, or
no-progress blockers.
9. Return the merged Factory commit.
## Safety Rules
- Do not edit files inside `factory`.
- Do not run product implementation work in this skill.
- Do not hide unrelated dirty files; stop and report them.
- Use `--force-with-lease` only for the dedicated sync branch after resetting it
from current `main`; stop if the lease fails.
- Do not inspect PR CI for the submodule-pointer-only PR; only wait when
branch protection requires pending checks to clear before GitHub allows merge.
- Use machine-readable command output when useful, for example `wrkr scan --json`,
`axym collect --dry-run --json`, or `gait doctor --json` depending on the active repo.
## Output
- synced Factory commit SHA
- PR URL or `already up to date`
- merge SHA when a PR was merged
- post-merge CI status and hotfix PRs when used
- next suggested command, such as `Use $adhoc-plan ...`Related Skills
We are still matching the closest adjacent skills for this page. In the meantime, continue through the full directory.