@ikyyofc/gemini-cli 5.0.4 → 5.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikyyofc/gemini-cli",
3
- "version": "5.0.4",
3
+ "version": "5.0.5",
4
4
  "description": "AI Agent CLI — native function calling · GEMINI.md context · extensions",
5
5
  "type": "module",
6
6
  "bin": { "gemini": "./index.js" },
package/src/agent.js CHANGED
@@ -22,30 +22,21 @@ function buildSystemPrompt(extra = "") {
22
22
  const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
23
23
  const datetime = now.toLocaleString("id-ID", { timeZone: tz, dateStyle: "full", timeStyle: "long" });
24
24
 
25
- const skillIndex = skills.length
26
- ? `\n## AVAILABLE SKILLS
27
- Skills contain expert instructions. Before starting any task:
28
- 1. Review the list below
29
- 2. Identify which skill(s) apply
30
- 3. Read them with read_file BEFORE doing anything else
31
- 4. Follow the skill instructions exactly
32
-
33
- ${skills.map(s =>
34
- `- **${s.slug}**: ${s.description}\n → read_file("${SKILLS_DIR}/${s.slug}/SKILL.md")`
35
- ).join("\n")}`
25
+ const skillHint = skills.length
26
+ ? "\n## SKILLS\nALWAYS call get_skills() first before starting any task."
36
27
  : "";
37
28
 
38
29
  return `You are an autonomous AI coding agent running in the user's terminal.
39
30
 
40
31
  ## CURRENT TIME
41
32
  ${datetime} (${tz})
42
- ${skillIndex}
33
+ ${skillHint}
43
34
 
44
35
  ## CORE RULE — NEVER ASK, ALWAYS ACT
45
36
  Use tools to complete every task. Never instruct the user to do anything themselves.
46
37
 
47
38
  ## WORKFLOW
48
- 1. CHECK SKILLSread any relevant SKILL.md before starting
39
+ 1. CALL get_skills()always check for expert skill instructions first
49
40
  2. EXPLORE — understand the project structure
50
41
  3. ACT — complete the task fully using tools
51
42
  4. VERIFY — test after changes
package/src/tools.js CHANGED
@@ -273,6 +273,16 @@ export const FUNCTION_DECLARATIONS = [
273
273
  description: "Get current environment info: working directory, platform, Node.js version, git branch, shell, home directory.",
274
274
  parameters: { type: "OBJECT", properties: {} }
275
275
  },
276
+ {
277
+ name: "get_skills",
278
+ description: "ALWAYS call this at the start of every task. Returns available skills — each skill contains expert instructions for specific task types. If a relevant skill exists, call get_skills again with its slug to read the full instructions before proceeding.",
279
+ parameters: {
280
+ type: "OBJECT",
281
+ properties: {
282
+ slug: { type: "STRING", description: "Skill slug to read full content. Leave empty to list all available skills." }
283
+ }
284
+ }
285
+ },
276
286
 
277
287
  // ── Real-time ────────────────────────────────────────────────
278
288
  {
@@ -694,6 +704,25 @@ export async function executeTool(name, args = {}, { autoApprove = false } = {})
694
704
  };
695
705
  }
696
706
 
707
+ case "get_skills": {
708
+ const { loadSkills, SKILLS_DIR } = await import("./skills.js");
709
+ const skills = loadSkills();
710
+
711
+ // No slug → list all available skills
712
+ if (!args.slug) {
713
+ if (!skills.length) return { result: "No skills installed." };
714
+ const list = skills.map(s =>
715
+ `${s.slug}\n description: ${s.description}`
716
+ ).join("\n\n");
717
+ return { result: `Available skills:\n\n${list}\n\nTo read a skill: call get_skills with slug="<slug>"` };
718
+ }
719
+
720
+ // Slug provided → return full SKILL.md content
721
+ const skill = skills.find(s => s.slug === args.slug);
722
+ if (!skill) return { error: `Skill "${args.slug}" not found. Call get_skills without slug to see available skills.` };
723
+ return { result: skill.content };
724
+ }
725
+
697
726
  // ── Real-time ─────────────────────────────────────────
698
727
  case "get_weather": {
699
728
  const loc = encodeURIComponent(args.location);