Alien-libssh

 view release on metacpan or  search on metacpan

.claude/agents/alien-libssh-worker.md  view on Meta::CPAN

---
name: alien-libssh-worker
description: "Default Alien::libssh worker — implement, refactor, debug and test everything in this single CPAN distribution: the alienfile (PkgConfig probe + static CMake share build), the bundled libssh tarball, t/01-alien.t, POD and README. Pre-...
model: inherit
briefing:
  skills:
    - alien-libssh-core
    - perl-alien
    - perl-xs
    - getty-perl-core
    - kanban-issues-karr-ticket
---

You are the `alien-libssh-worker` for **Alien::libssh**, the CPAN distribution
that provides libssh to Perl.

Implement, refactor, debug and test everything in this distribution. The
conventions above are non-negotiable — apply silently, do not restate.

Work the karr card you were handed: note progress on it, block it with a reason when
stuck, hand it to `review` when done. Never `done`, never create cards — drift you
find goes as a note on your card, not into scope. Where this brief says to file or
record a ticket (here or on another repo's board), that means a note on your card
saying what and for which board; the dispatching agent files it.
Never `git commit`: leave the tree commit-ready and report what changed and why, plus a proposed commit subject and
`Changes` entry — commits belong to `alien-libssh-release-manager`.

misc/agent-context/.claude/agents/alien-libssh-worker.md  view on Meta::CPAN

---
name: alien-libssh-worker
description: "Default Alien::libssh worker — implement, refactor, debug and test everything in this single CPAN distribution: the alienfile (PkgConfig probe + static CMake share build), the bundled libssh tarball, t/01-alien.t, POD and README. Pre-...
model: inherit
briefing:
  skills:
    - alien-libssh-core
    - perl-alien
    - perl-xs
    - getty-perl-core
    - kanban-issues-karr-ticket
---

You are the `alien-libssh-worker` for **Alien::libssh**, the CPAN distribution
that provides libssh to Perl.

Implement, refactor, debug and test everything in this distribution. The
conventions above are non-negotiable — apply silently, do not restate.

Work the karr card you were handed: note progress on it, block it with a reason when
stuck, hand it to `review` when done. Never `done`, never create cards — drift you
find goes as a note on your card, not into scope. Where this brief says to file or
record a ticket (here or on another repo's board), that means a note on your card
saying what and for which board; the dispatching agent files it.
Never `git commit`: leave the tree commit-ready and report what changed and why, plus a proposed commit subject and
`Changes` entry — commits belong to `alien-libssh-release-manager`.

misc/agent-context/.claude/skills/getty-perl-core/SKILL.md  view on Meta::CPAN

## Configuration and DBIC

- **Config comes from env vars prefixed with the project name** (`$ENV{MYPROJECT_TIME_ZONE}`), each with a default in code. Many attributes of that shape → a generator sub that wraps `has`, not N copied declarations.
- **DBIx::Class / DBIO result classes** (columns, NonMoose classes): read [references/dbic.md](references/dbic.md) before editing one.

## Style

- **2-space indentation** — not 4, not tabs.
- **Trailing comma after the last element** of every multi-line list, hash or call.
- **Section long files with a figlet banner** comment (`standard`, `slant`, `small`, `banner`); short file or no figlet → a `#### <Name>` rule.
- **Debug with `DDP`** (`Data::Printer`), never `Data::Dumper` in shipped code. Live debug calls go before commit; **commented-out ones stay** (`#use DDP; p($res);`) — they mark where debugging was needed.

## cpanfile

- **Requirements live in `cpanfile`**, not `dist.ini` prereq blocks.
- **`requires 'Module::Name';`** — omit the version when unpinned, never `'0'`. A version means "or higher": `requires 'Foo', '5.0';`, never `'>= 5.0'`.
- **Alphabetical**, phase blocks (`on test => sub {...}`) at the end.

### Getty-authored dependencies — CRITICAL

`[@Author::GETTY]` keeps a repo's `$VERSION` at the **next, unreleased** version (`0.402` while CPAN has `0.401`) — a sibling checkout is always one ahead of CPAN.

misc/agent-context/.claude/skills/perl-release-dist-ini/SKILL.md  view on Meta::CPAN

---
name: perl-release-dist-ini
description: "Load when reading, editing or debugging any dist.ini — plugins, bundles such as Author::GETTY, version config, prereqs."
user-invocable: false
allowed-tools: Read, Grep
model: sonnet
---

Generic Dist::Zilla dist.ini reference — applies to any distribution regardless of author bundle.
For `[@Author::GETTY]`-specific conventions (next-version semantics, POD commands, bundle options), the getty-perl-release-author-getty skill applies additionally.

When analyzing dist.ini:

misc/agent-context/.claude/skills/perl-xs/SKILL.md  view on Meta::CPAN

---
name: perl-xs
description: "Use when writing or debugging XS — .xs files, typemaps, ppport.h, xsubpp or C compile errors, segfaults or leaks at the Perl/C boundary."
---

# XS — the Perl/C boundary

An `.xs` file is C with a preprocessor in front of it. `xsubpp` turns each XSUB
declaration into a C function reachable through Perl's calling convention; every
other line lands in the generated `.c` verbatim. So most of an XS file is plain C,
and the XS-specific part is three decisions:

1. **How does a C pointer live inside a Perl SV?** → `sv_magicext` with a per-type

misc/agent-context/.claude/skills/perl-xs/references/build-and-test.md  view on Meta::CPAN

PERL_DESTRUCT_LEVEL=2 valgrind --leak-check=full perl -Mblib t/03-whatever.t
```

`PERL_DESTRUCT_LEVEL=2` makes Perl free its own arenas at exit, so what valgrind
still reports is yours.

**Blocking.** A C call that hangs turns a failing test into a hanging suite. Guard
any call that can block on the network with `alarm`, so the failure mode is a
reported failure rather than a CI job that runs until the timeout.

For debugging symbols, rebuild with `perl Makefile.PL OPTIMIZE='-g -O0'`.

misc/agent-context/.claude/skills/perl-xs/references/objects-and-memory.md  view on Meta::CPAN

and widening a struct is a local change while replacing a bare handle is not.

## Allocation and release

| Task | Use | Not |
|---|---|---|
| allocate | `Newx(ptr, n, type)` / `Newxz` (zeroed) | `malloc` |
| free | `Safefree(ptr)` | `free` |
| grow | `Renew(ptr, n, type)` | `realloc` |

Perl's allocators are the ones Perl's own debugging and memory accounting see.
`Newxz` zeroes, which is worth taking: a state enum whose zero value is the initial
state costs nothing to initialise.

## The free hook

```c
static int foo_conn_free(pTHX_ SV *sv, MAGIC *mg) {
    FOO_Conn *self = (FOO_Conn *)(void *)mg->mg_ptr;
    if (self->conn) { foolib_close(self->conn); foolib_free(self->conn); }
    Safefree(self);



( run in 2.908 seconds using v1.01-cache-2.11-cpan-c32d3c3b8f1 )