用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ffsshhttiikk/opencode-agents-skills --skill planning-ai命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | planning-ai |
| description | AI planning and scheduling |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"machine-learning-engineers","category":"artificial-intelligence"} |
Use me when:
;; Domain definition
(define (domain robot-navigation)
(:requirements :strips :typing)
(:types location robot)
(:predicates
(at ?r - robot ?l - location)
(connected ?l1 ?l2 - location)
(holding ?r - robot))
(:action move
:parameters (?r - robot ?from ?to - location)
:precondition (and (at ?r ?from) (connected ?from ?to))
:effect (and (not (at ?r ?from)) (at ?r ?to)))
(:action pick
:parameters (?r - robot ?l - location)
:precondition (at ?r ?l)
:effect (holding ?r)))
;; Problem
(define (problem robot-prob1)
(:domain robot-navigation)
(:objects r1 - robot loc1 loc2 loc3 - location)
(:init (at r1 loc1) (connected loc1 loc2) (connected loc2 loc3))
(:goal (at r1 loc3)))
from pyplan import planning
# A* Search Planning
def plan(start, goal, successors, heuristic):
frontier = [(0, start)]
came_from = {start: None}
cost_so_far = {start: 0}
while frontier:
_, current = heapq.heappop(frontier)
if current == goal:
return reconstruct_path(came_from, current)
for next_state in successors(current):
new_cost = cost_so_far[current] + 1
if next_state not in cost_so_far or new_cost < cost_so_far[next_state]:
cost_so_far[next_state] = new_cost
priority = new_cost + heuristic(next_state, goal)
heapq.heappush(frontier, (priority, next_state))
came_from[next_state] = current
return None