Shapes turns action-first: action leads, steps numbered, state restated. Use for ADHD-friendly output. Do not use to trim tokens; use response-compression.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Provides auth patterns for API keys, OAuth, and token management. Use when implementing or reviewing service authentication and credential handling.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
Common authentication patterns for integrating with external services. Provides consistent approaches to credential management, verification, and error handling.
| Method | Best For | Environment Variable |
|---|---|---|
| API Key | Simple integrations | {SERVICE}_API_KEY |
| OAuth | User-authenticated | Browser-based flow |
| Token | Session-based | {SERVICE}_TOKEN |
| None | Public APIs | N/A |
from leyline.auth import verify_auth, AuthMethod
# API Key verification
status = verify_auth(
service="gemini", method=AuthMethod.API_KEY, env_var="GEMINI_API_KEY"
)
if not status.authenticated:
print(f"Auth failed: {status.message}")
print(f"Action: {status.suggested_action}")
Verification: Run the command with --help flag to verify availability.
def verify_with_smoke_test(service: str) -> bool:
"""Verify auth with simple request."""
result = execute_simple_request(service, "ping")
return result.success
Verification: Run pytest -v to verify tests pass.
def check_credentials(service: str, env_var: str) -> bool:
value = os.getenv(env_var)
if not value:
print(f"Missing {env_var}")
return False
return True
Verification: Run the command with --help flag to verify availability.
def verify_with_service(service: str) -> AuthStatus:
result = subprocess.run([service, "auth", "status"], capture_output=True)
return AuthStatus(
authenticated=(result.returncode == 0), message=result.stdout.decode()
)
Verification: Run the command with --help flag to verify availability.
def handle_auth_failure(service: str, method: AuthMethod) -> str:
actions = {
AuthMethod.API_KEY: f"Set {service.upper()}_API_KEY environment variable",
AuthMethod.OAUTH: f"Run '{service} auth login' for browser auth",
AuthMethod.TOKEN: f"Refresh token with '{service} token refresh'",
}
return actions[method]
Verification: Run the command with --help flag to verify availability.
# In your skill's frontmatter
dependencies: [leyline:authentication-patterns]
Verification: Run the command with --help flag to verify availability.
For workflows requiring interactive authentication with token caching and session management:
# Source the interactive auth script
source plugins/leyline/scripts/interactive_auth.sh
# Ensure authentication before proceeding
ensure_auth github || exit 1
ensure_auth gitlab || exit 1
ensure_auth aws || exit 1
# Continue with authenticated operations
gh pr view 123
glab issue list
aws s3 ls
Features:
See modules/interactive-auth.md for complete documentation.
modules/auth-methods.md for method detailsmodules/verification-patterns.md for testing patternsmodules/interactive-auth.md for shell-based auth flows아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Shapes turns action-first: action leads, steps numbered, state restated. Use for ADHD-friendly output. Do not use to trim tokens; use response-compression.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Inverts burden of proof for code additions. Use when reviewing PRs, planning refactors, or running unbloat to challenge every addition's necessity.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Tracks per-agent token usage and flags waste in parallel dispatch. Use when evaluating parallel agent efficiency or after a multi-agent run.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Coordinates Claude agent teams via filesystem protocol. Use when orchestrating parallel agents with task dependencies. Do not use for single-agent tasks.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Evaluates API surface design, consistency, and exemplar alignment. Use when reviewing public API changes or before releasing a new API surface.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Selects architecture paradigm via research before scaffolding. Use when architecture is undecided and the choice needs justification and documentation.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.