Skip to content

rag-architect: hardcoded API key placeholder in cohere.Client example #194

Description

@specterslient95-lgtm

Problem

The skills/rag-architect/SKILL.md reranking example uses:

co = cohere.Client("YOUR_API_KEY")

The surrounding skill does not show a safer secret-loading pattern for this provider.

Impact

This can teach users or agents to paste secrets directly into source code. In a RAG implementation skill, credential handling examples should consistently model environment-variable or secret-manager usage.

Suggested fix

Replace the placeholder with an environment-based pattern, for example:

import os
import cohere

co = cohere.Client(os.environ["COHERE_API_KEY"])

Also add a short note not to commit provider API keys.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions