Skip to content

smorky850612/Aurakit / skills/aura

All-in-one fullstack dev engine. /aura: 46 modes (build/fix/clean/deploy/review/spec/lore/ax/experiment/payment/debug/qa/orchestrate/escalate+), 6-layer security with 32 hooks, tiered models (ZERO/ECO/PRO/MAX), 8 languages, 16 specialized agents, SPEC/EARS/TRUST5/XLOOP/RALF/Autopus absorbed. ~55% token savings.

FileKindSize
SKILL.mdskill md29.2 KB
resources/agent-security.mdmarkdown4.2 KB
resources/agent-spawning.mdmarkdown5.9 KB
resources/agent-team.mdmarkdown5.7 KB
resources/archive-pipeline.mdmarkdown3.5 KB
resources/autopus-agent-teams.mdmarkdown6.8 KB
resources/autopus-ax-annotation.mdmarkdown6.1 KB
resources/autopus-executor-profiles.mdmarkdown9.9 KB
resources/autopus-experiment-loop.mdmarkdown5.9 KB
resources/autopus-lore-commit.mdmarkdown6.0 KB
resources/autopus-pipeline-v2.mdmarkdown8.5 KB
resources/autopus-spec-system.mdmarkdown4.8 KB
resources/autopus-validator-gates.mdmarkdown7.0 KB
resources/autopus-worktree-isolation.mdmarkdown4.6 KB
resources/baas-pipeline.mdmarkdown3.8 KB
resources/batch-pipeline.mdmarkdown4.9 KB
resources/brainstorming.mdmarkdown4.7 KB
resources/branch-finishing.mdmarkdown4.7 KB
resources/build-pipeline.mdmarkdown12.0 KB
resources/build-resolvers-cpp.mdmarkdown10.0 KB
resources/build-resolvers-go.mdmarkdown1.2 KB
resources/build-resolvers-java.mdmarkdown9.1 KB
resources/build-resolvers-kotlin.mdmarkdown8.7 KB
resources/build-resolvers-python.mdmarkdown9.0 KB
resources/build-resolvers-rust.mdmarkdown1.2 KB
resources/build-resolvers-swift.mdmarkdown11.9 KB
resources/build-resolvers.mdmarkdown1.6 KB
resources/business-skills.mdmarkdown7.0 KB
resources/cache-engineering.mdmarkdown6.6 KB
resources/clean-pipeline.mdmarkdown6.5 KB
resources/common-protocol.mdmarkdown7.4 KB
resources/config-schema.mdmarkdown3.0 KB
resources/cross-harness.mdmarkdown16.6 KB
resources/deploy-enterprise.mdmarkdown9.0 KB
resources/deploy-pipeline.mdmarkdown6.9 KB
resources/design-pipeline.mdmarkdown3.2 KB
resources/desktop-pipeline.mdmarkdown3.5 KB
resources/discovery-protocol.mdmarkdown3.3 KB
resources/e2e-pipeline.mdmarkdown7.7 KB
resources/explain-pipeline.mdmarkdown972 B
resources/fix-pipeline.mdmarkdown5.6 KB
resources/framework-patterns.mdmarkdown8.3 KB
resources/gap-check.mdmarkdown3.4 KB
resources/install-guide.mdmarkdown3.4 KB
resources/instinct-system.mdmarkdown6.8 KB
resources/iterate-pipeline.mdmarkdown2.5 KB
resources/language-reviewers.mdmarkdown18.5 KB
resources/loop-pipeline.mdmarkdown3.5 KB
resources/mcp-configs.mdmarkdown4.7 KB
resources/migrate-pipeline.mdmarkdown1.5 KB
resources/mobile-pipeline.mdmarkdown3.5 KB
resources/mode-reference.mdmarkdown6.1 KB
resources/model-routing.mdmarkdown9.1 KB
resources/orchestration-patterns.mdmarkdown5.9 KB
resources/payment-lemonsqueezy.mdmarkdown5.6 KB
resources/payment-pipeline.mdmarkdown10.6 KB
resources/payment-polar.mdmarkdown3.6 KB
resources/payment-steppay.mdmarkdown4.8 KB
resources/payment-stripe.mdmarkdown6.7 KB
resources/payment-toss.mdmarkdown7.2 KB
resources/pipeline-guide.mdmarkdown6.1 KB
resources/plan-pipeline.mdmarkdown2.4 KB
resources/pm-pipeline.mdmarkdown4.5 KB
resources/qa-pipeline.mdmarkdown8.8 KB
resources/report-pipeline.mdmarkdown3.0 KB
resources/review-pipeline.mdmarkdown8.0 KB
resources/rollback-pipeline.mdmarkdown1.3 KB
resources/security-rules.mdmarkdown17.5 KB
resources/snippets-guide.mdmarkdown4.6 KB
resources/status-dashboard.mdmarkdown5.3 KB
resources/style-guide.mdmarkdown2.7 KB
resources/systematic-debugging.mdmarkdown5.7 KB
resources/tdd-pipeline.mdmarkdown4.4 KB

resources/payment-steppay.md

View on GitHub
# AuraKit — StepPay 결제 파이프라인

> PAYMENT 모드에서 StepPay 선택 시 로딩. 공통 스키마 → payment-pipeline.md 참조.

---

## StepPay

> 한국 BNPL/후불결제. 무이자 할부, 소상공인 타겟.

### .env.example
```
STEPPAY_SECRET_KEY=your-steppay-secret-key
STEPPAY_STORE_ID=your-store-id
NEXT_PUBLIC_URL=https://your-app.com
```

### 구독 주문 생성
```typescript
const response = await fetch('https://api.steppay.kr/api/v1/orders', {
  method: 'POST',
  headers: {
    'Secret-Token': process.env.STEPPAY_SECRET_KEY!,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    customerId: user.steppayCustomerId,
    items: [{ priceId: planPriceId, quantity: 1 }],
    successUrl: `${process.env.NEXT_PUBLIC_URL}/dashboard?success=true`,
    cancelUrl: `${process.env.NEXT_PUBLIC_URL}/pricing`,
  }),
});

const { orderUid, url } = await response.json();
// url로 redirect → 결제 페이지
```

### 웹훅 핸들러 (`/api/webhooks/steppay`)
```typescript
import crypto from 'crypto';

export async function POST(req: Request) {
  const body = await req.text();
  const sig      = req.headers.get('x-steppay-signature') ?? '';
  const expected = crypto.createHmac('sha256', process.env.STEPPAY_SECRET_KEY!).update(body).digest('hex');

  // 명시적 hex 버퍼 비교 — timingSafeEqual 길이 오류 방지
  const expectedBuf = Buffer.from(expected, 'hex');
  const sigBuf      = Buffer.from(sig, 'hex');
  if (sigBuf.length === 0 || sigBuf.length !== expectedBuf.length ||
      !crypto.timingSafeEqual(expectedBuf, sigBuf)) {
    return NextResponse.json({ error: 'Invalid signature' }, { status: 400 });
  }

  const payload = JSON.parse(body);

  // eventId 결정 — timestamp 없으면 에러로 차단 (SEC-022 수정: 빈 timestamp로 인한 idempotency 파괴 방지)
  let eventId: string;
  if (payload.eventId) {
    eventId = String(payload.eventId);
  } else if (payload.subscriptionId && payload.type && payload.timestamp) {
    eventId = `${payload.subscriptionId}_${payload.type}_${payload.timestamp}`;
  } else {
    return NextResponse.json({ error: 'Cannot derive stable event ID' }, { status: 400 });
  }

  const client = await db.connect();
  try {
    await client.query('BEGIN');

    const inserted = await client.query(
      'INSERT INTO webhook_events (provider, event_id, event_type, payload) VALUES ($1,$2,$3,$4) ON CONFLICT (provider, event_id) DO NOTHING',
      ['steppay', eventId, payload.type, JSON.stringify(payload)]
    );
    if (inserted.rowCount === 0) {
      await client.query('ROLLBACK');
      return NextResponse.json({ ok: true });
    }

    switch (payload.type) {
      case 'subscription.active': {
        // nextBillingDate null 방어 (EDGE-005 수정)
        if (!payload.nextBillingDate) {
          await client.query('ROLLBACK');
          return NextResponse.json({ error: 'Missing nextBillingDate' }, { status: 400 });
        }
        await upsertSubscription({
          provider: 'steppay',
          providerSubscriptionId: payload.subscriptionId,
          providerPriceId: String(payload.priceId),
          userId: payload.customerId,
          status: 'active',
          currentPeriodStart: new Date(payload.startDate),
          currentPeriodEnd: new Date(payload.nextBillingDate),
          trialEnd: null,
        }, client);
        break;
      }
      case 'subscription.updated': {
        if (!payload.nextBillingDate) {
          await client.query('ROLLBACK');
          return NextResponse.json({ error: 'Missing nextBillingDate' }, { status: 400 });
        }
        await client.query(
          "UPDATE subscriptions SET status=$1, current_period_end=$2, updated_at=now() WHERE provider_subscription_id=$3",
          [payload.status ?? 'active', new Date(payload.nextBillingDate), payload.subscriptionId]
        );
        break;
      }
      case 'subscription.canceled':
        await client.query(
          "UPDATE subscriptions SET status='canceled', canceled_at=now(), updated_at=now() WHERE provider_subscription_id=$1",
          [payload.subscriptionId]
        );
        break;
      case 'subscription.payment_failed':
        await client.query(
          "UPDATE subscriptions SET status='past_due', updated_at=now() WHERE provider_subscription_id=$1",
          [payload.subscriptionId]
        );
        break;
    }

    await client.query(
      'UPDATE webhook_events SET processed_at=now() WHERE provider=$1 AND event_id=$2',
      ['steppay', eventId]
    );
    await client.query('COMMIT');
  } catch (err) {
    await client.query('ROLLBACK');
    console.error('[steppay-webhook] processing error:', err);
    return NextResponse.json({ error: 'Internal error' }, { status: 500 });
  } finally {
    client.release();
  }

  return NextResponse.json({ ok: true });
}
```

---

rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall