Skip to content

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

518 B
Raw Blame
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define MAX_SIZE 256

static int validate(const char *input) {
    return input != NULL && strlen(input) > 0;
}

char *process(const char *input) {
    if (!validate(input)) {
        return NULL;
    }
    char *result = malloc(MAX_SIZE);
    strncpy(result, input, MAX_SIZE - 1);
    return result;
}

int main(int argc, char *argv[]) {
    char *out = process("hello");
    if (out) {
        printf("%s\n", out);
        free(out);
    }
    return 0;
}