feat: replace 'colab agent' command with 'colab skill' to output COLAB_SKILL.md (#40)
Seth Troisi committed
Jun 3, 2026 at 14:08 UTC
027e821653683b9f736a4996eec03f98ac0d0412
4 files changed
+18
-16
pyproject.toml
+1
-1
@@ -36,7 +36,7 @@ packages = ["src/colab_cli"]
36
37
[tool.hatch.build.targets.wheel.force-include]
38
"README.md" = "colab_cli/README.md"
39
-"AGENTS.md" = "colab_cli/AGENTS.md"
39
+"COLAB_SKILL.md" = "colab_cli/COLAB_SKILL.md"
40
41
[tool.uv]
42
package = true
src/colab_cli/cli.py
+3
-1
@@ -105,8 +105,10 @@ def callback(
105
"help",
106
"url",
107
"whoami",
108
+ "readme",
109
"README",
109
- "AGENT",
110
+ "skill",
111
+ "SKILL",
112
}
113
if ctx.invoked_subcommand not in _AUTO_UPDATE_SUPPRESSED:
114
auto_update.run_background_check()
src/colab_cli/commands/utility.py
+5
-5
@@ -416,9 +416,9 @@ def readme():
416
_print_resource("README.md")
417
418
419
-def agent():
420
- """Print the bundled AGENTS.md file"""
421
- _print_resource("AGENTS.md")
419
+def skill():
420
+ """Print the bundled COLAB_SKILL.md file"""
421
+ _print_resource("COLAB_SKILL.md")
422
423
424
def register(app: typer.Typer):
@@ -432,5 +432,5 @@ def register(app: typer.Typer):
432
app.command(name="whoami", hidden=True)(whoami)
433
app.command(name="readme")(readme)
434
app.command(name="README", hidden=True)(readme)
435
- app.command(name="agent")(agent)
436
- app.command(name="AGENT", hidden=True)(agent)
435
+ app.command(name="skill")(skill)
436
+ app.command(name="SKILL", hidden=True)(skill)
tests/test_readme.py
+9
-9
@@ -46,23 +46,23 @@ def test_readme_from_resources(mock_resources):
46
mock_resources.return_value.joinpath.assert_called_with("README.md")
47
48
49
-def test_agent_from_resources(mock_resources):
50
- mock_agents = MagicMock()
51
- mock_agents.is_file.return_value = True
52
- mock_agents.read_text.return_value = "Fake AGENTS content"
49
+def test_skill_from_resources(mock_resources):
50
+ mock_skill = MagicMock()
51
+ mock_skill.is_file.return_value = True
52
+ mock_skill.read_text.return_value = "Fake SKILL content"
53
54
def joinpath_side_effect(name):
55
- if name == "AGENTS.md":
56
- return mock_agents
55
+ if name == "COLAB_SKILL.md":
56
+ return mock_skill
57
return MagicMock(is_file=MagicMock(return_value=False))
58
59
mock_resources.return_value.joinpath.side_effect = joinpath_side_effect
60
61
- result = runner.invoke(app, ["AGENT"])
61
+ result = runner.invoke(app, ["SKILL"])
62
assert result.exit_code == 0
63
- assert result.output.strip() == "Fake AGENTS content"
63
+ assert result.output.strip() == "Fake SKILL content"
64
mock_resources.assert_called_once_with("colab_cli")
65
- mock_resources.return_value.joinpath.assert_called_with("AGENTS.md")
65
+ mock_resources.return_value.joinpath.assert_called_with("COLAB_SKILL.md")
66
67
68
def test_readme_fallback_to_file(mock_resources):