finos/morphir-scala / .claude/skills/squire
squire
VerifiedUse when morphir-scala work needs environment diagnostics or build/network/sandbox unblocking; reference repository management; branch lifecycle refresh after squash-merging a target branch into main; Morphir IR spec/schema sync or export; or task-tracking configuration and beads mode resolution.
SquireProcess.scala
View on GitHub//| scalaVersion: 3.9.0
//| moduleDeps: [SquireModel.scala]
import java.nio.charset.StandardCharsets
import kyo.*
final case class ProcessRequest(argv: Chunk[String], cwd: Maybe[Path] = Absent) derives CanEqual
final case class ProcessResult(request: ProcessRequest, exitCode: Int, stdout: String, stderr: String) derives CanEqual
trait ProcessRunner:
def run(request: ProcessRequest): ProcessResult < (Async & Abort[SquireError])
object LiveProcessRunner extends ProcessRunner:
def run(request: ProcessRequest): ProcessResult < (Async & Abort[SquireError]) =
Abort.recover[CommandException](exception =>
Abort.fail(
SquireError.Failure(
"process",
"could not launch external command",
Present(exception.getMessage)
)
)
) {
Scope.run {
for
process <- command(request).spawn
stdoutFiber <- Fiber.init(Scope.run(process.stdout.run))
stderrFiber <- Fiber.init(Scope.run(process.stderr.run))
exitCode <- process.waitFor
stdout <- stdoutFiber.get
stderr <- stderrFiber.get
yield ProcessResult(
request,
exitCode.toInt,
new String(stdout.toArray, StandardCharsets.UTF_8),
new String(stderr.toArray, StandardCharsets.UTF_8)
)
}
}
private def command(request: ProcessRequest): Command =
request.cwd match
case Present(path) => Command(request.argv.toSeq*).cwd(path)
case Absent => Command(request.argv.toSeq*)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |