pull_skills()
Bring a project's skills up to date with its setup on Framework Cloud.
Reads the project's current skill list from Framework Cloud with its project token
(GET /api/v1/projects/pull), as edited there with Edit project. Missing skills
are added. Unedited skills are updated to their latest versions: Framework's from
this framework-py, and Cloud skills from Cloud (their latest versions need
fw.cloud_login(); otherwise the versions in the project's setup are used).
Skills no longer in the setup are never deleted, only listed.
.framework/skills.lock.json records, for each copy of a skill, the hash pull last
wrote there. A copy that still has it is unedited and is updated; any other copy is
locally edited, even one reverted to an older version, and is kept and listed.
overwrite=True replaces edited copies too, backing them up to
.framework/skills-backups/, but never moves a skill to an older version, and never
chooses between copies that differ. A skill in several assistant folders is judged as
one: when its copies differ, or one is missing beside an edited one, it is diverged
and the message gives the skills_copy() call that fixes it. A folder another
skill tracks is kept and never written. After a folder is renamed by hand, the
message gives the skills_move() call that records it. Every copy is checked
before anything is written, and a copy edited while the pull runs is kept, as
edited. The Skills table in AGENTS.md is refreshed.
Usage
pull_skills(
project_path: str | Path = '.',
overwrite: bool = False,
dry_run: bool = False,
) -> dict[str, Any]
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| project_path | str | Path | '.' |
The project's root directory. Default: the current directory. |
| overwrite | bool | False |
Replace locally edited skills too, after backing them up. |
| dry_run | bool | False |
Report what would change and write nothing. |
Value
A dict: source ("cloud" or "package"), dry_run, skills (one row per
skill, plus one per kept, untracked, or removed folder, each with name,
status, paths, reason and hint (words and the call to run), and
reason_code, hint_key, and hint_args), steps (one per copy, with
its action), counts by status, message (the summary line), and
notes.
Details
Offline, signed out, or without a project token, the package skills in the local settings are used instead, and the message says so; your own Cloud skills are then listed as unavailable.
Raises
ProjectNotFoundError: When the folder is not a Framework project.ProjectServerMissingError: When.envhasFW_PROJECT_TOKENbut noFW_CLOUD_URL.