You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

556 lines
6.6KB

  1. # [Skill Name]
  2. Version: 0.1.0
  3. Status: CANDIDATE
  4. ## Purpose
  5. Describe the reusable job this skill performs.
  6. A good purpose answers:
  7. ```text
  8. What class of problem does this skill solve?
  9. ```
  10. Keep the purpose specific.
  11. Avoid vague purposes such as:
  12. ```text
  13. "Help with development."
  14. ```
  15. Prefer:
  16. ```text
  17. "Safely import delimited text files into Microsoft Access while validating schema, row counts, errors, and rollback conditions."
  18. ```
  19. ---
  20. # 1. Trigger Conditions
  21. Use this skill when:
  22. * [trigger]
  23. * [trigger]
  24. * [trigger]
  25. Do not use this skill when:
  26. * [non-trigger]
  27. * [non-trigger]
  28. Trigger conditions should make it obvious when an agent should load the skill.
  29. ---
  30. # 2. Inputs
  31. Required inputs:
  32. ```text
  33. INPUT 1:
  34. Description
  35. INPUT 2:
  36. Description
  37. ```
  38. Optional inputs:
  39. ```text
  40. OPTIONAL INPUT 1:
  41. Description
  42. ```
  43. If an input can be discovered from the project, inspect the project before asking the user.
  44. ---
  45. # 3. Preconditions
  46. Before executing this skill, verify:
  47. ```text
  48. [ ] required inputs exist
  49. [ ] relevant project instructions have been read
  50. [ ] required tools or dependencies are available
  51. [ ] destructive actions have appropriate safeguards
  52. [ ] assumptions are documented
  53. ```
  54. Add domain-specific preconditions when necessary.
  55. ---
  56. # 4. Output Contract
  57. The skill should produce:
  58. ```text
  59. OUTPUT 1
  60. OUTPUT 2
  61. OUTPUT 3
  62. ```
  63. Define what success looks like.
  64. Avoid vague output descriptions such as:
  65. ```text
  66. "Provide a good solution."
  67. ```
  68. Prefer:
  69. ```text
  70. "Produce a verified PowerShell script, list required permissions, provide rollback steps, and report the exact verification commands used."
  71. ```
  72. ---
  73. # 5. Procedure
  74. Follow this process.
  75. ## Step 1 — Discover
  76. Inspect:
  77. * relevant files
  78. * existing implementations
  79. * configuration
  80. * dependencies
  81. * tests
  82. * documentation
  83. Do not assume project facts that can be discovered.
  84. ---
  85. ## Step 2 — Understand
  86. Identify:
  87. ```text
  88. OBJECTIVE
  89. CURRENT STATE
  90. DESIRED STATE
  91. CONSTRAINTS
  92. DEPENDENCIES
  93. RISKS
  94. ```
  95. ---
  96. ## Step 3 — Execute
  97. Describe the reusable procedure.
  98. Example:
  99. ```text
  100. 1. validate input
  101. 2. inspect destination
  102. 3. prepare change
  103. 4. execute change
  104. 5. capture result
  105. 6. verify
  106. ```
  107. Keep steps concrete and executable.
  108. ---
  109. ## Step 4 — Verify
  110. Define verification methods.
  111. Prefer:
  112. ```text
  113. automated test
  114. build
  115. static analysis
  116. query
  117. command output
  118. row-count comparison
  119. smoke test
  120. direct inspection
  121. ```
  122. A skill without verification is incomplete.
  123. ---
  124. ## Step 5 — Handle Failure
  125. If verification fails:
  126. ```text
  127. STOP
  128. CAPTURE ERROR
  129. IDENTIFY FAILURE POINT
  130. DIAGNOSE
  131. CORRECT ROOT CAUSE
  132. RETRY VERIFICATION
  133. ```
  134. Do not continue as though the operation succeeded.
  135. ---
  136. # 6. Decision Rules
  137. Add decision rules when the procedure contains branches.
  138. Example:
  139. ```text
  140. IF destination exists
  141. inspect compatibility
  142. IF destination does not exist
  143. create it
  144. IF schema differs
  145. stop and reconcile mapping
  146. IF import errors occur
  147. capture rejected rows
  148. ```
  149. Prefer explicit decisions over vague instructions.
  150. ---
  151. # 7. Safety Rules
  152. Document any important safety boundaries.
  153. Examples:
  154. ```text
  155. do not delete source data before verification
  156. do not overwrite production configuration without backup
  157. do not log secrets
  158. do not disable security controls to make a procedure work
  159. do not perform destructive migration without rollback
  160. ```
  161. Remove this section if the skill has no meaningful safety considerations.
  162. ---
  163. # 8. Failure Handling
  164. Known failure classes:
  165. ## Failure Type 1
  166. Symptoms:
  167. ```text
  168. ...
  169. ```
  170. Likely cause:
  171. ```text
  172. ...
  173. ```
  174. Response:
  175. ```text
  176. ...
  177. ```
  178. ---
  179. ## Failure Type 2
  180. Symptoms:
  181. ```text
  182. ...
  183. ```
  184. Likely cause:
  185. ```text
  186. ...
  187. ```
  188. Response:
  189. ```text
  190. ...
  191. ```
  192. Do not attempt to list every theoretical failure.
  193. Document recurring or high-impact failures.
  194. ---
  195. # 9. Verification Checklist
  196. Before considering this skill complete:
  197. ```text
  198. [ ] required inputs validated
  199. [ ] procedure completed
  200. [ ] output exists
  201. [ ] expected behavior verified
  202. [ ] errors checked
  203. [ ] regressions considered
  204. [ ] destructive changes validated
  205. [ ] result communicated clearly
  206. ```
  207. Customize this checklist for the skill.
  208. ---
  209. # 10. Examples
  210. ## Example 1 — Normal Case
  211. ### Input
  212. ```text
  213. ...
  214. ```
  215. ### Process
  216. ```text
  217. ...
  218. ```
  219. ### Expected Output
  220. ```text
  221. ...
  222. ```
  223. ---
  224. ## Example 2 — Edge Case
  225. ### Input
  226. ```text
  227. ...
  228. ```
  229. ### Expected Handling
  230. ```text
  231. ...
  232. ```
  233. Examples are optional when the procedure is already obvious.
  234. They are strongly recommended for complex skills.
  235. ---
  236. # 11. Interaction Rules
  237. Specify whether this skill should:
  238. ```text
  239. run autonomously
  240. ask questions
  241. pause before destructive action
  242. operate interactively
  243. produce a complete result
  244. ```
  245. Example:
  246. ```text
  247. Ask only when a critical variable cannot be discovered.
  248. Do not ask for confirmation for reversible low-risk steps.
  249. Require explicit user approval before destructive production changes.
  250. ```
  251. ---
  252. # 12. Tool Guidance
  253. If the skill commonly uses specific tools, describe them here.
  254. Example:
  255. ```text
  256. Prefer repository search before broad file reads.
  257. Use build/test tools when available.
  258. Use database queries to validate imported row counts.
  259. Use version-control diff inspection before completion.
  260. ```
  261. Do not hard-code tools unless they are truly part of the skill.
  262. ---
  263. # 13. Related Skills
  264. Related skills:
  265. ```text
  266. .ai/skills/[skill]/SKILL.md
  267. ```
  268. Use related skills rather than duplicating their full procedures.
  269. Example:
  270. ```text
  271. Use mirror-audit before high-risk implementation.
  272. Use red-team after verification.
  273. Use retrospective after substantial work.
  274. ```
  275. ---
  276. # 14. Self-Improvement Rules
  277. This skill may be improved when:
  278. ```text
  279. a recurring failure is discovered
  280. a step is repeatedly unclear
  281. a better verification method is found
  282. a project pattern becomes reusable
  283. the procedure produces unnecessary work
  284. ```
  285. Before changing this skill:
  286. ```text
  287. 1. capture evidence
  288. 2. identify the failure or improvement
  289. 3. make the smallest useful edit
  290. 4. test the revised procedure
  291. 5. update the version
  292. 6. update this changelog
  293. 7. update .ai/CHANGELOG.md when appropriate
  294. ```
  295. Do not expand the skill based only on speculative edge cases.
  296. ---
  297. # 15. Versioning
  298. Use:
  299. ```text
  300. PATCH
  301. ```
  302. for:
  303. * clarification
  304. * typo
  305. * small missing check
  306. Use:
  307. ```text
  308. MINOR
  309. ```
  310. for:
  311. * new behavior
  312. * new procedure branch
  313. * new verification method
  314. Use:
  315. ```text
  316. MAJOR
  317. ```
  318. when:
  319. * purpose changes
  320. * trigger changes incompatibly
  321. * output contract changes incompatibly
  322. * the skill is fundamentally redesigned
  323. ---
  324. # 16. Changelog
  325. ## 0.1.0
  326. Initial candidate skill.
  327. ### Evidence
  328. [What real work justified creating this skill?]
  329. ### Verification
  330. [How was the skill tested?]
  331. ### Result
  332. PENDING

Powered by TurnKey Linux.